"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/jsx-runtime.js"),t=require("./styles.js"),R=require("../../utils/index.js"),f=require("../../hooks/useClickOutside.js");function S({id:a,isOpen:r,width:u,title:x,onShowSideSheet:d,backdrop:l=!1,fixed:o=!1,hideHeader:s=!1,hideCloseButton:c=!1,hideOnOutsideClick:j=!1,orientation:p="right",children:m,...i}){const n=()=>{d()},{containerRef:h}=f.useOnClickOutside(n);return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(t.SideSheetContainer,{ref:j&&r?h:null,id:a,isOpen:r,width:u,fixed:o,orientation:p,"data-testid":i["data-testid"],"data-trackid":i["data-trackid"],children:e.jsxRuntimeExports.jsxs(t.SideSheetContentWrapper,{customContent:s,children:[!s&&e.jsxRuntimeExports.jsxs(t.HeaderWrapper,{children:[e.jsxRuntimeExports.jsx(t.TitleWrapper,{children:x}),!c&&e.jsxRuntimeExports.jsx(t.CloseButton,{onClick:n})]}),m]})}),l&&r?e.jsxRuntimeExports.jsx(t.BackDrop,{}):R.unitJSX]})}exports.SideSheet=S;
