import { jsx as _jsx } from "react/jsx-runtime";
import { BedrockMemoryToggle } from './bedrock-memory-toggle.js';
const meta = {
    title: 'Components/BedrockMemoryToggle',
    component: BedrockMemoryToggle,
    tags: ['autodocs'],
    parameters: { layout: 'centered' },
    decorators: [
        (Story) => (_jsx("div", { style: { width: '420px', padding: '1rem' }, children: _jsx(Story, {}) })),
    ],
};
export default meta;
const successAction = async () => ({
    ok: true,
    bedrockEnabled: true,
});
const pendingAction = () => new Promise(() => undefined);
const errorAction = async () => ({
    ok: false,
    code: 'PIPX_NOT_INSTALLED',
    remediation: 'Install pipx with `brew install pipx && pipx ensurepath`, then reopen your terminal.',
});
export const Default = {
    args: {
        applicationId: 'app-default',
        initialEnabled: false,
        enableActionOverride: successAction,
    },
};
export const Loading = {
    args: {
        applicationId: 'app-loading',
        initialEnabled: false,
        enableActionOverride: pendingAction,
    },
    play: async ({ canvasElement }) => {
        const sw = canvasElement.querySelector('[data-testid="bedrock-memory-toggle"]');
        sw?.click();
    },
};
export const Error = {
    args: {
        applicationId: 'app-error',
        initialEnabled: false,
        enableActionOverride: errorAction,
    },
    play: async ({ canvasElement }) => {
        const sw = canvasElement.querySelector('[data-testid="bedrock-memory-toggle"]');
        sw?.click();
    },
};
