"use strict";

var _define = require("../preactement/define");
var _Drawer = require("../../Drawer");
var _wrapperUtils = require("../wrapperUtils");
var _jsxRuntime = require("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__*/(0, _jsxRuntime.jsx)(_Drawer.Drawer, {
    hasFocusTrap: (0, _wrapperUtils.parseBooleanAttr)(hasFocusTrap),
    backdropClickExits: (0, _wrapperUtils.parseBooleanAttr)(backdropClickExits),
    isHeaderSticky: (0, _wrapperUtils.parseBooleanAttr)(isHeaderSticky),
    isFooterSticky: (0, _wrapperUtils.parseBooleanAttr)(isFooterSticky),
    isOpen: (0, _wrapperUtils.parseBooleanAttr)(isOpen),
    ariaLabel: closeButtonAriaLabel,
    ...otherProps,
    children: children
  });
};

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

/* eslint-enable */

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