export default class PCApplication extends SvelteApplication
{
/**
* Document store that monitors updates to any assigned document.
*
* @type {TJSDocument<foundry.abstract.Document>}
*/
#documentStore = new TJSDocument(void 0, { delete: this.close.bind(this) });
constructor(object) {
super(object);
// Define document store property
Object.defineProperty(this.reactive, "document", {
get: () => this.#documentStore.get(),
set: (document) => {
this.#documentStore.set(document);
},
});
this.reactive.document = object;
}
static get defaultOptions() {
const title = this.title;
return foundry.utils.mergeObject(super.defaultOptions, {
id: 'foundryvtt-actor-studio-pc-sheet',
title: game.i18n.localize('GAS.ActorStudio')+' - '+game.i18n.localize('GAS.PCTitle'),
classes: ['gas-actor-studio'],
width: 650,
height: 600,
headerIcon: 'modules/foundryvtt-actor-studio/assets/actor-studio-logo-dragon-white.svg',
minWidth: 500,
padding: 0,
resizable: true,
focusAuto: false,
minimizable: true,
svelte: {
class: PCAppShell,
target: document.body,
props: function () {
return { documentStore: this.#documentStore, document: this.reactive.document };
},
},
});
}
export default class PCApplication extends SvelteApplication
{
/**
* Document store that monitors updates to any assigned document.
*
* @type {TJSDocument<foundry.abstract.Document>}
*/
#documentStore = new TJSDocument(void 0, { delete: this.close.bind(this) });
constructor(object) {
super(object);
// Define document store property
Object.defineProperty(this.reactive, "document", {
get: () => this.#documentStore.get(),
set: (document) => {
this.#documentStore.set(document);
},
});
this.reactive.document = object;
}
static get defaultOptions() {
const title = this.title;
return foundry.utils.mergeObject(super.defaultOptions, {
id: 'foundryvtt-actor-studio-pc-sheet',
title: game.i18n.localize('GAS.ActorStudio')+' - '+game.i18n.localize('GAS.PCTitle'),
classes: ['gas-actor-studio'],
width: 650,
height: 600,
headerIcon: 'modules/foundryvtt-actor-studio/assets/actor-studio-logo-dragon-white.svg',
minWidth: 500,
padding: 0,
resizable: true,
focusAuto: false,
minimizable: true,
svelte: {
class: PCAppShell,
target: document.body,
props: function () {
return { documentStore: this.#documentStore, document: this.reactive.document };
},
},
});
}