import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useDeployCreate2WizardStore } from './deployCreate2WizardStore.js';
import { Select } from '@inkjs/ui';
import { Box, Text } from 'ink';
import { zodSupportedNetwork, } from '../superchain-registry/fetchChainList.js';
export const SelectNetwork = () => {
    const { wizardState, submitSelectNetwork } = useDeployCreate2WizardStore();
    if (wizardState.stepId !== 'select-network') {
        throw new Error('Invalid state');
    }
    return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { children: "Select which network the L2 chain is based on" }), _jsx(Select, { options: zodSupportedNetwork.options.map(network => ({
                    label: network,
                    value: network,
                })), onChange: (network) => submitSelectNetwork({ network: network }) })] }));
};
