import Legend from "./Index"

export default {
    title: "Component/Base/Legend",
    tags: ["autodocs"],
    component: Legend,
    argTypes: {
        type: {
            control: { type: 'select' },
            options: ['available', 'reserved', 'selected'],
            description: "Seat's status",

        },
    },
}

const getStoryTitle = (type) => {
    switch (type) {
        case 'selected':
            return "Selected";
        case 'reserved':
            return 'Reserved';
        case 'available':
            return 'Available';
        default:
            return "Available"
    }
}

export const Default = {
    args:{
        type: "available"
    },
    render: (args) => {
        return <Legend type={args.type}>{getStoryTitle(args.type)}</Legend>
    }
};


