import { type ISheetOptions } from '@breadstone/mosaik-elements-foundation'; /** * Represents the return type of the `useSheet` hook. * * @public */ export interface IUseSheetReturn { /** * Opens a sheet with the specified wrapper component. * * @template T - Type of the wrapper component extending HTMLElement. * @template TData - Type of data provided to the wrapper component. * @template TResult - Expected return type of the resolved sheet result. * @param sheetId - Unique identifier for the sheet. * @param wrapperClass - Constructor for the wrapper component. * @param options - Optional sheet configuration. * @param data - Optional data to pass to the wrapper. * @returns Promise resolving to the sheet result. */ open(sheetId: string, wrapperClass: new (args?: TData) => T, options?: ISheetOptions, data?: TData): Promise; /** * Closes a sheet by its identifier. * * @template TResult - Type of the result to return. * @param sheetId - The identifier of the sheet to close. * @param result - Optional result to pass to the sheet opener. * @returns Promise that resolves when the sheet is closed. */ close(sheetId: string, result?: TResult): Promise; } /** * React hook for managing sheets using the foundation SheetService singleton. * * @remarks * This hook provides a React-idiomatic interface to the foundation SheetService. * The service should be configured at application startup using `SheetService.configure()`. * * @example * ```tsx * // In your app setup * SheetService.configure({ * closeOnNavigation: true, * behaviors: [] * }); * * // In your component * function MyComponent() { * const sheet = useSheet(); * * const handleOpen = async () => { * const result = await sheet.open('mySheet', MySheetWrapper, { * height: 'auto' * }); * console.log('Sheet result:', result); * }; * * return ; * } * ``` * * @public * @returns An object containing sheet management functions. */ export declare function useSheet(): IUseSheetReturn; //# sourceMappingURL=useSheet.d.ts.map