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 { StringField } from './string-field.js';
const meta = {
    title: 'Scalars/String Field',
    component: StringField,
    decorators: [withForm, (Story) => _jsx("div", { className: "w-48", children: Story() })],
    parameters: {
        layout: 'centered',
    },
    tags: ['autodocs'],
    argTypes: {
        ...getDefaultArgTypes(),
        ...PrebuiltArgTypes.placeholder,
        ...PrebuiltArgTypes.autoComplete,
        ...PrebuiltArgTypes.spellCheck,
        multiline: {
            control: 'boolean',
            description: 'Whether to render as a multi-line textarea',
            table: {
                type: { summary: 'boolean' },
                defaultValue: { summary: 'false' },
                category: StorybookControlCategory.COMPONENT_SPECIFIC,
            },
        },
        autoExpand: {
            control: 'boolean',
            description: 'Whether textarea should automatically expand as content grows',
            table: {
                type: { summary: 'boolean' },
                defaultValue: { summary: 'false' },
                category: StorybookControlCategory.COMPONENT_SPECIFIC,
            },
        },
        ...PrebuiltArgTypes.trim,
        ...PrebuiltArgTypes.uppercase,
        ...PrebuiltArgTypes.lowercase,
        ...PrebuiltArgTypes.diffMode,
        ...PrebuiltArgTypes.viewMode,
        ...PrebuiltArgTypes.baseValue,
        ...getValidationArgTypes(),
        ...PrebuiltArgTypes.minLength,
        ...PrebuiltArgTypes.maxLength,
        ...PrebuiltArgTypes.pattern,
    },
    args: {
        name: 'string-field',
    },
};
export default meta;
export const Default = {
    args: {
        label: 'String Input',
        placeholder: 'Type something...',
    },
};
export const WithDescription = {
    args: {
        label: 'Bio',
        description: 'Tell us a little bit about yourself',
        placeholder: 'I am a...',
    },
};
export const Required = {
    args: {
        label: 'Full Name',
        required: true,
        placeholder: 'John Doe',
    },
};
export const WithValue = {
    args: {
        label: 'Email',
        value: 'john.doe@example.com',
        placeholder: 'Enter your email',
    },
};
export const Disabled = {
    args: {
        label: 'Read Only Field',
        value: 'This field is disabled',
        disabled: true,
        placeholder: 'This field is disabled',
    },
};
export const WithError = {
    args: {
        label: 'Username',
        value: '123',
        required: true,
        errors: ['Username must be at least 8 characters long'],
        placeholder: 'Enter your username',
    },
};
export const WithWarning = {
    args: {
        label: 'Password',
        value: 'password123',
        warnings: ['Consider using a stronger password'],
        placeholder: 'Enter your password',
    },
};
export const Multiline = {
    args: {
        label: 'Comments',
        multiline: true,
        placeholder: 'Enter your comments here...',
        autoExpand: true,
    },
};
export const WithDefaultValue = {
    args: {
        label: 'Favorite Color',
        defaultValue: 'Blue',
        placeholder: 'Enter your favorite color',
    },
};
export const WithDifferencesAddition = {
    args: {
        label: 'Number difference addition',
        value: 'Lorem ipsum dolor sit amet consectetur adipiscing elit.',
        baseValue: 'Dolor sit amet consectetur adipiscing elit quisque faucibus.',
        viewMode: 'addition',
    },
};
export const WithDifferencesRemoval = {
    args: {
        label: 'Date difference removal',
        value: 'Lorem ipsum dolor sit amet consectetur adipiscing elit.',
        baseValue: 'Dolor sit amet consectetur adipiscing elit quisque faucibus.',
        viewMode: 'removal',
    },
};
export const WithDifferencesMixed = {
    args: {
        label: 'Date difference mixed',
        value: 'Lorem ipsum dolor sit amet consectetur adipiscing elit.',
        baseValue: 'Dolor sit amet consectetur adipiscing elit quisque faucibus.',
        viewMode: 'mixed',
    },
};
//# sourceMappingURL=string-field.stories.js.map