import { UMB_DOCUMENT_WORKSPACE_CONTEXT } from '../../workspace/document-workspace.context-token.js';
import { UmbWorkspaceActionBase } from '../../../../core/workspace/index.js';
export class UmbDocumentSaveAndPreviewOptionWorkspaceAction extends UmbWorkspaceActionBase {
    async execute() {
        const workspaceContext = await this.getContext(UMB_DOCUMENT_WORKSPACE_CONTEXT);
        if (!workspaceContext) {
            throw new Error('The workspace context is missing');
        }
        await workspaceContext?.saveAndPreview(this.manifest?.meta.urlProviderAlias);
    }
}
export { UmbDocumentSaveAndPreviewOptionWorkspaceAction as api };
