import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { SmartDeployButton } from './smart-deploy-button.js';
const baseState = {
    kind: 'deploy',
    changeCount: 0,
    hasCloud: true,
    hasRemote: true,
    liveUrl: null,
    errorMessage: null,
    failedSource: null,
    workingSource: null,
    cloudProviderName: null,
};
function PlaceholderPanel({ label }) {
    return (_jsxs("div", { className: "border-border bg-background w-[360px] rounded-md border p-4 text-xs", children: [_jsx("div", { className: "text-muted-foreground mb-2 text-[10px] tracking-wide uppercase", children: "Deploy panel" }), _jsxs("div", { children: ["This is a placeholder for the ", label, " state panel."] })] }));
}
const meta = {
    title: 'ApplicationPage/SmartDeployButton',
    component: SmartDeployButton,
    parameters: { layout: 'centered' },
};
export default meta;
const noop = () => undefined;
export const Loading = {
    args: {
        state: { ...baseState, kind: 'loading' },
        onPrimaryClick: noop,
        panel: _jsx(PlaceholderPanel, { label: "loading" }),
    },
};
export const GetOnline = {
    args: {
        state: { ...baseState, kind: 'getOnline', hasRemote: false, hasCloud: false },
        onPrimaryClick: noop,
        panel: _jsx(PlaceholderPanel, { label: "get online" }),
    },
};
export const Deploy = {
    args: {
        state: { ...baseState, kind: 'deploy' },
        onPrimaryClick: noop,
        panel: _jsx(PlaceholderPanel, { label: "deploy" }),
    },
};
export const Save = {
    args: {
        state: { ...baseState, kind: 'save', changeCount: 3, hasCloud: false },
        onPrimaryClick: noop,
        panel: _jsx(PlaceholderPanel, { label: "save" }),
    },
};
export const PushAndDeploy = {
    args: {
        state: { ...baseState, kind: 'pushAndDeploy', changeCount: 5 },
        onPrimaryClick: noop,
        panel: _jsx(PlaceholderPanel, { label: "push and deploy" }),
    },
};
export const Working = {
    args: {
        state: { ...baseState, kind: 'working' },
        onPrimaryClick: noop,
        panel: _jsx(PlaceholderPanel, { label: "working" }),
    },
};
export const Live = {
    args: {
        state: {
            ...baseState,
            kind: 'live',
            liveUrl: 'https://landing-page-hero-features-pricing-85f4e3.pages.dev',
        },
        onPrimaryClick: noop,
        panel: _jsx(PlaceholderPanel, { label: "live" }),
    },
};
export const Failed = {
    args: {
        state: {
            ...baseState,
            kind: 'failed',
            errorMessage: 'Push rejected by GitHub',
            failedSource: 'sync',
        },
        onPrimaryClick: noop,
        panel: _jsx(PlaceholderPanel, { label: "failed" }),
    },
};
export const LiveWithDirtyChanges = {
    args: {
        // After deploy, user has made local edits — Live label still shows but
        // a tiny dirty dot signals the drift.
        state: { ...baseState, kind: 'live', changeCount: 2, liveUrl: 'https://my-app.pages.dev' },
        onPrimaryClick: noop,
        panel: _jsx(PlaceholderPanel, { label: "live with drift" }),
    },
};
