import { html } from 'lit';
import { ifDefined } from 'lit-html/directives/if-defined.js';
import { action } from 'storybook/actions';
import './Radio.svelte';
const meta = {
    title: 'Form Elements/Radio',
    component: 'm-radio',
    args: {
        id: 'RadioId',
        label: 'Label',
    },
    render: (args) => {
        const onChange = action('change');
        const onFocus = action('focus');
        const onBlur = action('blur');
        return html `
      <m-radio
        id=${ifDefined(args.id)}
        name=${ifDefined(args.name)}
        label=${ifDefined(args.label)}
        ?checked=${args.checked}
        ?isinvalid=${args.isinvalid}
        ?disabled=${args.disabled}
        @change=${(event) => {
            onChange(event);
        }}
        @focus=${(event) => {
            onFocus(event);
        }}
        @blur=${(event) => {
            onBlur(event);
        }}
      ></m-radio>
    `;
    },
};
export default meta;
export const Default = {};
export const Checked = {
    args: {
        checked: true,
        id: 'checkedId',
    },
};
export const Invalid = {
    args: {
        isinvalid: true,
        id: 'invalidId',
    },
};
export const Disabled = {
    args: {
        disabled: true,
        id: 'disabledId',
    },
};
export const CheckedDisabled = {
    args: {
        checked: true,
        disabled: true,
        id: 'checkedDisabledId',
    },
};
