import { jsx as _jsx } from "react/jsx-runtime";
import { withForm } from '../../lib/decorators.js';
import { getDefaultArgTypes, getValidationArgTypes, PrebuiltArgTypes, StorybookControlCategory, } from '../../lib/storybook-arg-types.js';
import { PhoneNumberField } from './phone-number-field.js';
/**
 * ## Phone number field component
 *
 * `PhoneNumberField` is a specialized form component for handling phone numbers formatted according to the
 * <a href="https://www.itu.int/rec/T-REC-E.164-201011-I/en" target="_blank" rel="noopener noreferrer">ITU-T E.164</a>
 *  recommendation with built-in validation.
 * It is based on [PhoneNumberInput](?path=/docs/data-entry-phone-number-input--readme) component.
 */
const meta = {
    title: 'Scalars/Phone Number Field',
    component: PhoneNumberField,
    decorators: [
        withForm,
        (Story) => (_jsx("div", { style: { width: '280px', margin: '1rem auto 0' }, children: _jsx(Story, {}) })),
    ],
    parameters: {
        layout: 'padded',
    },
    tags: ['autodocs'],
    argTypes: {
        ...getDefaultArgTypes(),
        ...PrebuiltArgTypes.placeholder,
        ...PrebuiltArgTypes.pattern,
        ...getValidationArgTypes(),
        allowedCountries: {
            control: 'object',
            description: 'List of allowed country codes',
            table: {
                type: { summary: 'string[]' },
                category: StorybookControlCategory.COMPONENT_SPECIFIC,
            },
        },
        excludedCountries: {
            control: 'object',
            description: 'List of country codes to exclude',
            table: {
                type: { summary: 'string[]' },
                category: StorybookControlCategory.COMPONENT_SPECIFIC,
            },
        },
        includeDependentAreas: {
            control: 'boolean',
            description: 'Whether to include dependent territories in country list',
            table: {
                type: { summary: 'boolean' },
                defaultValue: { summary: 'false' },
                category: StorybookControlCategory.COMPONENT_SPECIFIC,
            },
        },
        prefixOptionFormat: {
            control: 'radio',
            options: ['CodesOnly', 'FlagsOnly', 'FlagsAndCodes', 'FlagsAndNumbers'],
            description: 'How to display country options in the prefix dropdown',
            table: {
                type: { summary: '"CodesOnly" | "FlagsOnly" | "FlagsAndCodes" | "FlagsAndNumbers"' },
                defaultValue: { summary: '"FlagsAndNumbers"' },
                category: StorybookControlCategory.COMPONENT_SPECIFIC,
            },
        },
        prefixProps: {
            control: 'object',
            description: 'Configs for the prefix dropdown',
            table: {
                type: {
                    summary: '{ placeholder?: string; searchable?: boolean; className?: string; contentClassName?: string; }',
                },
                defaultValue: {
                    summary: '{ placeholder: "+1", searchable: true, className: undefined, contentClassName: undefined }',
                },
                category: StorybookControlCategory.COMPONENT_SPECIFIC,
            },
        },
        ...PrebuiltArgTypes.viewMode,
        ...PrebuiltArgTypes.baseValue,
    },
    args: {
        name: 'phone-number-field',
        label: 'Phone number field',
    },
};
export default meta;
export const Default = {};
export const Filled = {
    args: {
        defaultValue: '+14155552671',
    },
};
export const WithDifferencesAddition = {
    args: {
        label: 'Phone number field addition',
        defaultValue: '+14155552671',
        baseValue: '+442072705238',
        viewMode: 'addition',
    },
};
export const WithDifferencesRemoval = {
    args: {
        label: 'Phone number field removal',
        defaultValue: '+14155552671',
        baseValue: '+442072705238',
        viewMode: 'removal',
    },
};
export const WithDifferencesMixed = {
    args: {
        label: 'Phone number field mixed',
        defaultValue: '+14155552671',
        baseValue: '+442072705238',
        viewMode: 'mixed',
    },
};
//# sourceMappingURL=phone-number-field.stories.js.map