import { spread } from '@open-wc/lit-helpers';
import { getStorybookHelpers } from '@wc-toolkit/storybook-helpers';
import { html } from 'lit';
import { prespread } from '../../.storybook/utilities.js';
import './index.js';
const { events, args, argTypes } = getStorybookHelpers('w-textarea');
const meta = {
    title: 'Forms/Textarea',
    render(args) {
        return html `<w-textarea ${spread(prespread(args))}></w-textarea>`;
    },
    args,
    argTypes,
    parameters: {
        actions: {
            handles: events,
        },
    },
};
export default meta;
export const Default = {
    args: {
        label: 'Description',
    },
};
export const WithPlaceholder = {
    args: {
        label: 'Description',
        placeholder: 'A Link to the Past is a distant prequel to the original The Legend of Zelda',
    },
};
export const WithHelpText = {
    args: {
        label: 'Description',
        'help-text': 'You can provide a help text if necessary',
    },
};
export const NoVisualLabel = {
    args: {
        'aria-label': 'Description',
    },
};
export const Invalid = {
    args: {
        label: 'Description',
        invalid: true,
        'help-text': 'A description is required',
    },
};
export const Disabled = {
    args: {
        label: 'Description',
        disabled: true,
        value: 'A Link to the Past is a distant prequel to the original The Legend of Zelda, and, within the official chronology, is the first game in the "Defeated Hero" timeline that connects to an alternate reality scenario where the Hero of Time does not succeed in Ocarina of Time.',
    },
};
export const ReadOnly = {
    args: {
        label: 'Description',
        'read-only': true,
        value: 'A Link to the Past is a distant prequel to the original The Legend of Zelda, and, within the official chronology, is the first game in the "Defeated Hero" timeline that connects to an alternate reality scenario where the Hero of Time does not succeed in Ocarina of Time.',
    },
};
export const Optional = {
    args: {
        label: 'Description',
        optional: true,
    },
};
export const ControlledSize = {
    args: {
        label: 'Description',
        'minimum-rows': 3,
        'maximum-rows': 3,
    },
};
export const Autofocus = {
    args: {
        label: 'Description',
        'minimum-rows': 3,
        'maximum-rows': 3,
        placeholder: 'Refresh to see the autofocus take effect',
        autofocus: true,
    },
};
