import { withForm } from "../decorators.js";
import { getDefaultArgTypes, getValidationArgTypes, StorybookControlCategory, } from "../storybook-arg-types.js";
import { RadioGroupField } from "./radio-group-field.js";
const meta = {
    title: "UI/RadioGroupField",
    component: RadioGroupField,
    decorators: [withForm],
    parameters: {
        layout: "centered",
        chromatic: {
            disableSnapshot: true,
        },
    },
    tags: ["autodocs"],
    argTypes: {
        ...getDefaultArgTypes(),
        options: {
            control: "object",
            description: "Array of options with label, value, description, and disabled state",
            table: {
                type: {
                    summary: "Array<{ label: string; value: string; description?: string; disabled?: boolean; }>",
                },
                defaultValue: { summary: "[]" },
                category: StorybookControlCategory.COMPONENT_SPECIFIC,
            },
        },
        ...getValidationArgTypes(),
    },
    args: {
        name: "radio-group",
        errors: [],
        warnings: [],
    },
};
export default meta;
const defaultOptions = [
    { label: "Option 1", value: "1" },
    { label: "Option 2", value: "2" },
    { label: "Option 3", value: "3" },
];
// Basic examples
export const Default = {
    args: {
        label: "Radio Group",
        options: defaultOptions,
    },
};
export const WithDescription = {
    args: {
        label: "Radio Group",
        description: "This is a helpful description for the Radio Group",
        options: defaultOptions,
    },
};
export const Required = {
    args: {
        label: "Required Radio Group",
        options: defaultOptions,
        required: true,
    },
};
export const WithDefaultValue = {
    args: {
        label: "Radio Group with an option selected by default",
        defaultValue: "2",
        options: defaultOptions,
    },
};
export const Disabled = {
    args: {
        label: "Disabled Radio Group",
        disabled: true,
        options: defaultOptions,
        value: defaultOptions[0].value,
    },
};
// Validation states
export const WithError = {
    args: {
        label: "Radio Group with errors",
        errors: ["Please select an option"],
        options: defaultOptions,
    },
};
export const WithWarning = {
    args: {
        label: "Radio Group with warnings",
        warnings: ["Your selection may need review"],
        options: defaultOptions,
        defaultValue: "3",
    },
};
// Special features
export const WithDescriptionInOptions = {
    args: {
        label: "Radio Group with description in options",
        options: [
            {
                label: "Option 1",
                value: "1",
                description: "Description for option 1",
            },
            {
                label: "Option 2",
                value: "2",
                description: "Description for option 2",
            },
        ],
    },
};
export const WithDisabledOptions = {
    args: {
        label: "Radio Group with disabled options",
        options: [
            { label: "Option 1", value: "1" },
            { label: "Option 2", value: "2", disabled: true },
            { label: "Option 3", value: "3" },
            {
                label: "Option 4",
                value: "4",
                disabled: true,
                description: "This option is disabled",
            },
        ],
    },
};
//# sourceMappingURL=radio-group-field.stories.js.map