import { html } from 'lit-html';
import { ifDefined } from 'lit-html/directives/if-defined';
import { unsafeHTML } from 'lit-html/directives/unsafe-html';
const baseString = '<p>Lorem ipsum dolor <a href="#">sit amet</a>, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>';
const generateText = (numberOfParagraphs = 1) => Array(numberOfParagraphs).fill(baseString).join('');
const meta = {
  argTypes: {
    headerText: { table: { disable: true } },
    icon: { table: { disable: true } },
    modalBody: { table: { disable: true } },
    modalFooter: { table: { disable: true } },
    open: { table: { disable: true } },
    palette: { table: { disable: true } },
  },
  args: {
    headerText: 'Modal header text',
    icon: '',
    modalBody: 'a small amount of text',
    modalFooter: `<abds-button onclick="(()=>alert('Inline onclick function executed'))()">Click me</abds-button>`,
    open: true,
    palette: '',
  },
  parameters: {
    controls: {
      hideNoControlsWarning: true,
      sort: 'requiredFirst',
    },
    docs: {
      iframeHeight: '420px',
      inlineStories: false,
    },
  },
  title: 'Components/Modal/',
};
const story = ({ headerText, icon, modalBody, modalFooter, open, palette }) => html `
  <abds-button
    onclick="(() => {
      const modal = document.querySelector('abds-modal');
      modal.setAttribute('open', !modal.open);
    })();"
  >
    Open modal
  </abds-button>
  <abds-modal
    header-text="${ifDefined(headerText || undefined)}"
    icon="${ifDefined(icon || undefined)}"
    open="${ifDefined(open || undefined)}"
    palette="${ifDefined(palette || undefined)}"
  >
    <div slot="modal-body">${unsafeHTML(generateText(modalBody === 'a small amount of text' ? 1 : 6))}</div>
    ${modalFooter &&
  html `
      <div slot="modal-footer">${unsafeHTML(modalFooter)}</div>
    `}
  </abds-modal>
`;
export { meta, story };
//# sourceMappingURL=template.js.map