import { themes } from '@storybook/theming';
import { html } from 'lit-html';
import { ifDefined } from 'lit-html/directives/if-defined';
export const meta = {
  argTypes: {
    appearance: { table: { disable: true } },
    buttonType: { table: { disable: true } },
    disabled: { table: { disable: true } },
    formId: { table: { disable: true } },
    href: { table: { disable: true } },
    iconEnd: { table: { disable: true } },
    iconStart: { table: { disable: true } },
    palette: { table: { disable: true } },
    rel: { table: { disable: true } },
    target: { table: { disable: true } },
    width: { table: { disable: true } },
  },
  args: {
    appearance: '',
    buttonType: '',
    disabled: false,
    formId: '',
    href: '',
    iconEnd: '',
    iconStart: '',
    palette: '',
    rel: '',
    target: '',
    width: '',
  },
  decorators: [
    (story, { args: { palette } }) => {
      var _a;
      return html `
        <style type="text/css">
          .sbdocs-preview, .sb-show-main {
            ${palette === 'inverse' ? `background: ${(_a = themes.dark) === null || _a === void 0 ? void 0 : _a.appBg}` : ''};
          }
        </style>
        ${story()}
      `;
    },
  ],
  title: 'Components/Button/',
};
export const story = ({ appearance, buttonType, disabled, formId, href, iconEnd, iconStart, palette, rel, target, width, }) => html `
  <abds-button
    appearance="${ifDefined(appearance || undefined)}"
    button-type="${ifDefined(buttonType || undefined)}"
    disabled="${ifDefined(disabled || undefined)}"
    form-id="${ifDefined(formId || undefined)}"
    href="${ifDefined(href || undefined)}"
    icon-end="${ifDefined(iconEnd || undefined)}"
    icon-start="${ifDefined(iconStart || undefined)}"
    palette="${ifDefined(palette || undefined)}"
    rel="${ifDefined(rel || undefined)}"
    target="${ifDefined(target || undefined)}"
    width="${ifDefined(width || undefined)}"
  >
    ${href ? 'Link text' : 'Button text'}
  </abds-button>
`;
export default { meta, story };
//# sourceMappingURL=template.js.map