import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useBridgeWizardStore } from './bridgeWizardStore.js';
import { Select } from '@inkjs/ui';
import { Box, Text } from 'ink';
const supportedNetworks = ['mainnet', 'sepolia'];
export const SelectNetwork = () => {
    const { wizardState, submitSelectNetwork } = useBridgeWizardStore();
    if (wizardState.stepId !== 'select-network') {
        throw new Error('Invalid state');
    }
    return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { bold: true, children: "Which L1 network do you want to bridge from?" }), _jsx(Select, { options: supportedNetworks.map(network => ({
                    label: network,
                    value: network,
                })), onChange: value => submitSelectNetwork({ network: value }) })] }));
};
