import { zodSupportedNetwork } from '../../../util/fetchSuperchainRegistryChainList.js';
import { createWizardStore } from '../../../util/wizard-builder/createWizardStore.js';
import { defineWizard } from '../../../util/wizard-builder/defineWizard.js';
import { z } from 'zod';
const deployCreate2WizardStore = defineWizard()
    .addStep({
    id: 'enter-foundry-project-path',
    schema: z.object({
        foundryProjectPath: z.string(),
    }),
    title: 'Enter Foundry Project Path',
    getSummary: state => state.foundryProjectPath,
})
    .addStep({
    id: 'select-contract',
    schema: z.object({
        selectedContract: z.string(),
    }),
    title: 'Select Contract',
    getSummary: state => state.selectedContract,
})
    .addStep({
    id: 'configure-constructor-arguments',
    schema: z.object({
        constructorArgs: z.array(z.string()),
    }),
    title: 'Configure Constructor Arguments',
    getSummary: state => state.constructorArgs.join(', '),
})
    .addStep({
    id: 'configure-salt',
    schema: z.object({
        salt: z.string(),
    }),
    title: 'Configure Salt',
    getSummary: state => state.salt,
})
    .addStep({
    id: 'select-network',
    schema: z.object({
        network: zodSupportedNetwork,
    }),
    title: 'Select Network',
    getSummary: state => state.network,
})
    .addStep({
    id: 'select-chains',
    schema: z.object({
        chainNames: z.array(z.string()),
    }),
    title: 'Select Chains',
    getSummary: state => state.chainNames.join(', '),
})
    .addStep({
    id: 'should-verify-contract',
    schema: z.object({
        shouldVerifyContract: z.boolean(),
    }),
    title: 'Verify Contract',
    getSummary: state => (state.shouldVerifyContract ? 'Yes' : 'No'),
})
    .build();
export const useDeployCreate2WizardStore = createWizardStore(deployCreate2WizardStore);
export const deployCreate2WizardIndexByStepId = deployCreate2WizardStore.reduce((acc, step, index) => {
    acc[step.id] = index;
    return acc;
}, {});
