import { define } from '../preactement/define';
import { Drawer } from '../../Drawer';
import { parseBooleanAttr } from '../wrapperUtils';
import { jsx as _jsx } from "react/jsx-runtime";
const attributes = ['backdrop-click-exits', 'close-button-aria-label', 'close-button-text', 'close-button-variation', 'class-name', 'footer-title', 'footer-body', 'has-focus-trap', 'heading', 'heading-id', 'heading-level', 'is-header-sticky', 'is-footer-sticky', 'is-open'];
const Wrapper = _ref => {
  let {
    backdropClickExits,
    children,
    closeButtonAriaLabel,
    hasFocusTrap,
    isHeaderSticky,
    isFooterSticky,
    isOpen,
    ...otherProps
  } = _ref;
  return /*#__PURE__*/_jsx(Drawer, {
    hasFocusTrap: parseBooleanAttr(hasFocusTrap),
    backdropClickExits: parseBooleanAttr(backdropClickExits),
    isHeaderSticky: parseBooleanAttr(isHeaderSticky),
    isFooterSticky: parseBooleanAttr(isFooterSticky),
    isOpen: parseBooleanAttr(isOpen),
    ariaLabel: closeButtonAriaLabel,
    ...otherProps,
    children: children
  });
};

/* eslint-disable @typescript-eslint/no-namespace */

/* eslint-enable */

define('ds-drawer', () => Wrapper, {
  attributes,
  events: [['onCloseClick', event => ({
    detail: {
      event
    }
  })]],
  shadow: true
});