import { SemanticType } from '../Semantics.js';
/**
 * Type guard to check if a semantic is a Status semantic.
 */
export const isStatusSemantic = (semantic) => {
    return semantic.id === SemanticType.Status;
};
/**
 * Helper function to create a Status semantic with configuration.
 */
export const createStatusSemantic = (config = {}) => {
    const mergedConfig = {
        ...DEFAULT_STATUS_CONFIG,
        ...config,
        // Deep merge nested objects
        stateBehaviors: config.stateBehaviors
            ? { ...DEFAULT_STATUS_CONFIG.stateBehaviors, ...config.stateBehaviors }
            : DEFAULT_STATUS_CONFIG.stateBehaviors,
        workflow: config.workflow
            ? { ...DEFAULT_STATUS_CONFIG.workflow, ...config.workflow }
            : DEFAULT_STATUS_CONFIG.workflow,
    };
    if (config.metadata) {
        mergedConfig.metadata = { ...config.metadata };
    }
    return {
        id: SemanticType.Status,
        config: mergedConfig,
    };
};
/**
 * Default configuration for Status semantic.
 */
export const DEFAULT_STATUS_CONFIG = {
    allowedStates: ['draft', 'published', 'archived'],
    defaultState: 'draft',
    stateBehaviors: {
        draft: {
            isPublic: false,
            isEditable: true,
            isDeletable: true,
        },
        published: {
            isPublic: true,
            isEditable: true,
            isDeletable: false,
        },
        archived: {
            isPublic: false,
            isEditable: false,
            isDeletable: false,
        },
    },
    workflow: {
        requiresApproval: false,
        sendNotifications: false,
        logHistory: true,
        allowBulkChanges: false,
    },
};
//# sourceMappingURL=Status.js.map