import { jsx as _jsx } from "react/jsx-runtime";
import { SupervisorConfigForm } from './supervisor-config-form.js';
import { SupervisorAutonomy, SupervisorScopeType } from '../../../../../packages/core/src/domain/generated/output.js';
const meta = {
    title: 'Supervisor/SupervisorConfigForm',
    component: SupervisorConfigForm,
    parameters: { layout: 'padded' },
    decorators: [
        (Story) => (_jsx("div", { className: "max-w-xl", children: _jsx(Story, {}) })),
    ],
};
export default meta;
const samplePolicy = {
    id: 'pol-123',
    scopeType: SupervisorScopeType.app,
    scopeId: 'app-1',
    enabled: true,
    autonomyLevel: SupervisorAutonomy.advisory,
    modelId: 'claude-sonnet-4',
    promptVersion: 'v1',
    gateAuthorityJson: JSON.stringify({ merge: SupervisorAutonomy.cosign }),
    policyRulesJson: undefined,
    notificationOverridesJson: undefined,
    createdAt: '2026-04-01T00:00:00Z',
    updatedAt: '2026-04-15T00:00:00Z',
};
export const Default = {
    args: {
        scopeType: 'app',
        scopeId: 'app-1',
        initialPolicy: null,
        onSubmitOverride: async () => ({ ok: true }),
    },
};
export const ExistingPolicy = {
    args: {
        scopeType: 'app',
        scopeId: 'app-1',
        initialPolicy: samplePolicy,
        onSubmitOverride: async () => ({ ok: true }),
    },
};
export const FeatureOverride = {
    args: {
        scopeType: 'app',
        scopeId: 'app-1',
        featureId: 'feat-7',
        initialPolicy: null,
        onSubmitOverride: async () => ({ ok: true }),
    },
};
export const Loading = {
    args: {
        scopeType: 'app',
        scopeId: 'app-1',
        initialPolicy: null,
        forceState: 'loading',
        onSubmitOverride: async () => ({ ok: true }),
    },
};
export const Error = {
    args: {
        scopeType: 'app',
        scopeId: 'app-1',
        initialPolicy: null,
        forceState: 'error',
        onSubmitOverride: async () => ({ ok: false, error: 'Validation failed' }),
    },
};
