import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useState } from 'react';
import { DeploymentState } from '../../../../../../packages/core/src/domain/generated/output.js';
import { AppViewTabs } from './app-view-tabs.js';
function makeDeploy(overrides = {}) {
    return {
        deploy: async () => undefined,
        stop: async () => undefined,
        deployLoading: false,
        stopLoading: false,
        deployError: null,
        status: null,
        url: null,
        ...overrides,
    };
}
function Wrapper({ deploy }) {
    const [active, setActive] = useState('ide');
    return (_jsxs("div", { className: "bg-background border-border w-[480px] rounded-md border", children: [_jsx(AppViewTabs, { active: active, onChange: setActive, deploy: deploy }), _jsxs("div", { className: "text-muted-foreground p-4 text-xs", children: ["Active view: ", active] })] }));
}
const meta = {
    title: 'ApplicationPage/AppViewTabs',
    component: Wrapper,
    parameters: { layout: 'centered' },
};
export default meta;
export const Idle = {
    args: { deploy: makeDeploy() },
};
export const DevServerBooting = {
    args: {
        deploy: makeDeploy({
            status: DeploymentState.Booting,
            deployLoading: true,
        }),
    },
};
export const DevServerReady = {
    args: {
        deploy: makeDeploy({
            status: DeploymentState.Ready,
            url: 'http://localhost:5173',
        }),
    },
};
export const DevServerError = {
    args: {
        deploy: makeDeploy({
            deployError: 'Port 5173 is already in use',
        }),
    },
};
