import { jsx as _jsx } from "react/jsx-runtime";
import { DeploymentState } from '../../../../../../packages/core/src/domain/generated/output.js';
import { WebPreviewTab } from './web-preview-tab.js';
function makeDeploy(overrides = {}) {
    return {
        deploy: async () => undefined,
        stop: async () => undefined,
        deployLoading: false,
        stopLoading: false,
        deployError: null,
        status: null,
        url: null,
        ...overrides,
    };
}
const meta = {
    title: 'ApplicationPage/WebPreviewTab',
    component: WebPreviewTab,
    parameters: { layout: 'fullscreen' },
    decorators: [
        (Story) => (_jsx("div", { style: { height: 500, width: 720, display: 'flex', flexDirection: 'column' }, children: _jsx(Story, {}) })),
    ],
};
export default meta;
export const Default = {
    args: { deploy: makeDeploy() },
};
export const Booting = {
    args: {
        deploy: makeDeploy({ status: DeploymentState.Booting, deployLoading: true }),
    },
};
export const Ready = {
    args: {
        // Render an about:blank-equivalent so the iframe has a valid src
        // without ever hitting the network in Storybook.
        deploy: makeDeploy({
            status: DeploymentState.Ready,
            url: 'about:blank',
        }),
    },
};
export const ErrorState = {
    args: {
        deploy: makeDeploy({
            deployError: 'Failed to install dependencies: ENOSPC',
        }),
    },
};
