import { TJSDialog, SvelteApp } from '@typhonjs-fvtt/runtime/svelte/application'; /** * Provides a dialog for creating documents that by default is modal and not draggable. */ declare class TJSDocumentCreate extends TJSDialog { /** * Create a new Document of the type specified by `documentCls` by rendering a dialog window to provide basic * creation details. * * @param documentCls - Document class to create. * * @param [data] - Document data. * * @param [context] - Additional context options or dialog positioning options. * * @param [context.parent] - A parent Document within which these Documents should be embedded. * * @param [context.pack] - A Compendium pack identifier within which the Documents should be modified. * * @param [context.renderSheet] - Render the sheet for the new document. * * @param [context.options] - Rest of options to pass to TJSDialog / Application. * * @param [dialogData] - Optional data to modify dialog. */ private constructor(); /** * Create a new Document of the type specified by `documentCls` by rendering a dialog window to provide basic * creation details. * * @param documentCls - Document class to create. * * @param [data] - Document data. * * @param [context={}] - Additional context options or dialog positioning options. * * @param [context.parent] - A parent Document within which these Documents should be embedded. * * @param [context.pack] - A Compendium pack identifier within which the Documents should be modified. * * @param [context.renderSheet] - Render the sheet for the new document. * * @param [context.options] - Rest of options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The newly created document or a falsy value; either 'false' for * cancelling or 'null' if the user closed the dialog via `` or the close header button. */ static show( documentCls: D, data?: object, { parent, pack, renderSheet, ...options }?: { parent?: fvtt.Document | null; pack?: string | null; renderSheet?: boolean; } & Partial, dialogData?: TJSDialog.OptionsData, ): Promise | false | null>; } /** * Provides a reactive dialog for deleting documents that by default is modal and not draggable. An additional set of * accessors for the document assigned are available via the `this.reactive.document`. You may swap out the document at * any time by setting it to a different document. */ declare class TJSDocumentDelete extends TJSDialog { /** * @param document - Document to delete. * * @param [options] - TJSDialog / SvelteApp options. * * @param [dialogData] - Optional data to modify dialog. */ private constructor(); /** * Shows a modal / non-draggable dialog to delete a document. * * @param document - Document to delete. * * @param [options] - TJSDialog / SvelteApp options. * * @param [dialogData] - Optional data to modify dialog. * * @returns The document if deleted or a falsy value; either 'false' for cancelling or 'null' if the user closed the * dialog via `` or the close header button. */ static show( document: D, options?: SvelteApp.OptionsCore, dialogData?: TJSDialog.OptionsData, ): Promise; } /** * Provides several methods to create documents, folders, and modify them through use of TJSDialog and a modal and * non-draggable by default user experience. */ declare class TJSDocumentDialog { private constructor(); /** * Change ownership of a document by rendering a dialog to alter the default and all user / player ownership. * * @param document - Document instance to modify. * * @param [options] - Rest of options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The modified document or 'null' if the user closed the dialog via `` or the close header button. */ static configureOwnership( document: D, options?: SvelteApp.OptionsCore, dialogData?: TJSDialog.OptionsData, ): Promise; /** * Create a new Document of the type specified by `documentCls` by rendering a dialog window to provide basic * creation details. * * @param documentCls - Document class to create. * * @param [data] - Document data. * * @param [context={}] - Additional context options or dialog positioning options. * * @param [context.parent] - A parent Document within which these Documents should be embedded. * * @param [context.pack] - A Compendium pack identifier within which the Documents should be modified. * * @param [context.renderSheet] - Render the sheet for the new document. * * @param [context.options] - Rest of options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The newly created document or a falsy value; either 'false' for cancelling or 'null' if the user closed * the dialog via `` or the close header button. */ static documentCreate( documentCls: D, data?: object, { parent, pack, renderSheet, ...options }?: { parent?: fvtt.Document | null; pack?: string | null; renderSheet?: boolean; } & Partial, dialogData?: TJSDialog.OptionsData, ): Promise | false | null>; /** * Shows a modal / non-draggable dialog to delete a document. * * @param document - Document to delete. * * @param [options] - TJSDialog / SvelteApp options. * * @param [dialogData] - Optional data to modify dialog. * * @returns The document if deleted or a falsy value; either 'false' for cancelling or 'null' if the user closed the * dialog via `` or the close header button. */ static documentDelete( document: D, options?: SvelteApp.OptionsCore, dialogData?: TJSDialog.OptionsData, ): Promise; /** * Create a new Folder by rendering a dialog to provide basic creation details. * * @param {object} folderData - Initial data with which to populate the creation form. * * @param [options] - Options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The newly created Folder or null if the dialog is closed. */ static folderCreate( folderData: { type: string; }, options?: SvelteApp.OptionsCore, dialogData?: TJSDialog.OptionsData, ): Promise; /** * Deletes a folder and does delete subfolders / documents. * * @param document - Folder to delete. * * @param [options] - Options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The deleted Folder or a falsy value; either 'false' for cancelling or 'null' if the user closed the * dialog via `` or the close header button. */ static folderDelete( document: fvtt.Folder, options?: SvelteApp.OptionsCore, dialogData?: TJSDialog.OptionsData, ): Promise; /** * Shows a modal / non-draggable dialog to export a folder to an eligible compendium pack. * * @param document - Folder to export. * * @param [opts] - Additional options. * * @param [opts.pack] - The name of the compendium pack to provide an initial selection value in the dialog. * * @param [opts.merge=true] - Update existing entries in the Compendium pack, matching by name * * @param [opts.keepId=true] - Keep document IDs. * * @param [opts.options] - Rest of options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The compendium collection the folder is exported to or a falsy value; either 'false' for cancelling or * 'null' if the user closed the dialog via `` or the close header button. */ static folderExport( document: fvtt.Folder, { pack, merge, keepId, ...options }?: { pack?: string; merge?: boolean; keepId?: boolean; } & Partial, dialogData?: TJSDialog.OptionsData, ): Promise; /** * Removes a folder, but does not delete / remove sub-folders / documents. * * @param document - The folder to remove. * * @param [options] - Options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The removed Folder or a falsy value; either 'false' for cancelling or 'null' if the user closed the * dialog via `` or the close header button. */ static folderRemove( document: fvtt.Folder, options?: SvelteApp.OptionsCore, dialogData?: TJSDialog.OptionsData, ): Promise; /** * Create a RollTable from the contents of the Folder. * * @param document - Folder to create roll table from... * * @param [options] - Options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The newly created RollTable or a falsy value; either 'false' for cancelling or 'null' if the user closed * the dialog via `` or the close header button. */ static folderRolltable( document: fvtt.Folder, options?: SvelteApp.OptionsCore, dialogData?: TJSDialog.OptionsData, ): Promise; /** * Updates an existing Folder by rendering a dialog window with basic details. * * @param document - The folder to edit. * * @param [options] - Options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The modified Folder or null if the dialog is closed. */ static folderUpdate( document: fvtt.Folder, options?: SvelteApp.OptionsCore, dialogData?: TJSDialog.OptionsData, ): Promise; /** * Render an import dialog for updating the data related to this Document through an exported JSON file * * @param document - The document to import JSON to... * * @param [options] - Options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The document after import completes or a falsy value; either 'false' for cancelling or 'null' if the * user closed the dialog via `` or the close header button. */ static importFromJSON( document: D, options?: SvelteApp.OptionsCore, dialogData?: TJSDialog.OptionsData, ): Promise; } /** * Provides a reactive dialog for importing documents that by default is modal and not draggable. An additional set of * accessors for the document assigned are available via the `this.reactive.document`. You may swap out the document at * any time by setting it to a different document. */ declare class TJSDocumentImport extends TJSDialog { /** * Render an import dialog for updating the data related to this Document through an exported JSON file * * @param document - The document to import JSON to... * * @param [options] - Options to pass to TJSDialog / * Application. * * @param [dialogData] - Optional data to modify dialog. */ private constructor(); /** * Render an import dialog for updating the data related to this Document through an exported JSON file * * @param document - The document to import JSON to... * * @param [options] - Options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The document after import completes or a falsy value; either 'false' for cancelling or 'null' if the * user closed the dialog via `` or the close header button. */ static show( document: D, options?: SvelteApp.OptionsCore, dialogData?: TJSDialog.OptionsData, ): Promise; } /** * Provides a reactive dialog for permission control that by default is modal and not draggable. An additional set of * accessors for the document assigned are available via the `this.reactive.document`. You may swap out the document at * any time by setting it to a different document. */ declare class TJSDocumentOwnership extends TJSDialog { /** * @param document - Document to delete. * * @param [options] - TJSDialog / SvelteApp options. * * @param [dialogData] - Optional data to modify dialog. */ private constructor(); /** * Change permissions of a document by rendering a dialog to alter the default and all user / player permissions. * * @param document - Document instance to modify. * * @param [options] - Options to pass to TJSDialog / Application. * * @param [dialogData] - Optional data to modify dialog. * * @returns The modified document or 'null' if the user closed the dialog via `` or the close header button. */ static show( document: D, options?: SvelteApp.OptionsCore, dialogData?: TJSDialog.OptionsData, ): Promise; } /** * Provides a reactive dialog for modifying folders that by default is modal and not draggable. An additional set of * accessors for the folder assigned are available via the `this.reactive.document`. You may swap out the folder at * any time by setting it to a different folder document. */ declare class TJSFolderCreateUpdate extends TJSDialog { /** * @param document - Document to delete. * * @param [options] - TJSDialog / SvelteApp options. * * @param {TJSDialog.OptionsData} [dialogData] - Optional data to modify dialog. */ private constructor(); /** * Create a new Folder by rendering a dialog to provide basic creation details. * * @param {object} folderData - Initial data with which to populate the creation form. * * @param [options] - Options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The newly created Folder or null if the dialog is closed. */ static showCreate( folderData: { type: string; }, options?: SvelteApp.OptionsCore, dialogData?: TJSDialog.OptionsData, ): Promise; /** * Updates an existing Folder by rendering a dialog window with basic details. * * @param document - The folder to edit. * * @param [options] - Options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The modified Folder or null if the dialog is closed. */ static showUpdate( document: fvtt.Folder, options?: SvelteApp.OptionsCore, dialogData?: TJSDialog.OptionsData, ): Promise; } /** * Provides a reactive dialog for deleting a folder that by default is modal and not draggable. An additional set of * accessors for the folder assigned are available via the `this.reactive.document`. You may swap out the folder at any * time by setting it to a different folder document. */ declare class TJSFolderDelete extends TJSDialog { /** * Deletes a folder and does delete sub-folders / documents. * * @param document - Document to delete. * * @param [options] - TJSDialog / SvelteApp options. * * @param [dialogData] - Optional data to modify dialog. */ private constructor(); /** * Deletes a folder and does delete sub-folders / documents. * * @param document - Folder to delete. * * @param [options] - Options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The deleted Folder or a falsy value; either 'false' for cancelling or 'null' if the user closed the * dialog via `` or the close header button. */ static show( document: fvtt.Folder, options?: SvelteApp.OptionsCore, dialogData?: TJSDialog.OptionsData, ): Promise; } /** * Provides a reactive dialog for exporting folders to a compendium that by default is modal and not draggable. */ declare class TJSFolderExport extends TJSDialog { /** * Shows a modal / non-draggable dialog to export a folder to an eligible compendium pack. * * @param document - Folder to export. * * @param [opts] - Additional options. * * @param [opts.pack] - The name of the compendium pack to provide an initial selection value in the dialog. * * @param [opts.merge=true] - Update existing entries in the Compendium pack, matching by name * * @param [opts.keepId=true] - Keep document IDs. * * @param [opts.options] - Rest of options to pass to TJSDialog / SvelteApp. * * @param {TJSDialog.OptionsData} [dialogData] - Optional data to modify dialog. */ private constructor(); /** * Shows a modal / non-draggable dialog to export a folder to an eligible compendium pack. * * @param document - Folder to export. * * @param [opts] - Additional options. * * @param [opts.pack] - The name of the compendium pack to provide an initial selection value in the dialog. * * @param [opts.merge=true] - Update existing entries in the Compendium pack, matching by name * * @param [opts.keepId=true] - Keep document IDs. * * @param [opts.options] - Rest of options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The compendium collection the folder is exported to or a falsy value; either 'false' for cancelling or * 'null' if the user closed the dialog via `` or the close header button. */ static show( document: fvtt.Folder, { pack, merge, keepId, ...options }?: { pack?: string; merge?: boolean; keepId?: boolean; } & Partial, dialogData?: TJSDialog.OptionsData, ): Promise; } /** * Provides a reactive dialog for removing a folder that by default is modal and not draggable. An additional set of * accessors for the folder assigned are available via the `this.reactive.document`. You may swap out the folder at any * time by setting it to a different folder document. */ declare class TJSFolderRemove extends TJSDialog { /** * @param document - Folder to remove. * * @param [options] - TJSDialog / SvelteApp options. * * @param [dialogData] - Optional data to modify dialog. */ private constructor(); /** * Removes a folder, but does not delete / remove subfolders / documents. * * @param document - The folder to remove. * * @param [options] - Options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The removed Folder or a falsy value; either 'false' for cancelling or 'null' if the user closed the * dialog via `` or the close header button. */ static show( document: fvtt.Folder, options?: SvelteApp.OptionsCore, dialogData?: TJSDialog.OptionsData, ): Promise; } /** * Provides a reactive dialog for creating a RollTable from a folder that by default is modal and not draggable. An * additional set of accessors for the folder assigned are available via the `this.reactive.document`. You may swap out * the folder at any time by setting it to a different folder document. */ declare class TJSFolderRolltable extends TJSDialog { /** * @param document - Folder to create roll table from... * * @param [options] - Options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. */ private constructor(); /** * Create a RollTable from the contents of the Folder. * * @param document - Folder to create roll table from... * * @param [options] - Options to pass to TJSDialog / SvelteApp. * * @param [dialogData] - Optional data to modify dialog. * * @returns The newly created RollTable or a falsy value; either 'false' for cancelling or 'null' if the user closed * the dialog via `` or the close header button. */ static show( document: fvtt.Folder, options?: SvelteApp.OptionsCore, dialogData?: TJSDialog.OptionsData, ): Promise; } export { TJSDocumentCreate, TJSDocumentDelete, TJSDocumentDialog, TJSDocumentImport, TJSDocumentOwnership, TJSFolderCreateUpdate, TJSFolderDelete, TJSFolderExport, TJSFolderRemove, TJSFolderRolltable, };