"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("styled-components"),t=require("../../utils/index.js");function i(e){return e&&e.__esModule?e:{default:e}}var r=i(o);const n=100,s=o.keyframes`
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
`,d=o.keyframes`
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
`,l=o.keyframes`
  0% {
    transform: translateY(100%);
  }
  75% {
    transform: translateY(-5%);
  }
  100% {
    transform: translateY(0%);
  }
`,p=r.default.div.withConfig({shouldForwardProp:t.convertToTransientProps(["isOpened","allowBackgroundInteractions","isOpened"])})`
  inset: 0;
  position: fixed;
  background-color: ${({allowBackgroundInteractions:e})=>e?"transparent":t.getColorAlias("overlay")};
  z-index: 5000;
  display: flex;
  justify-content: center;

  ${({allowBackgroundInteractions:e})=>e&&o.css`
      pointer-events: none;

      > div {
        pointer-events: auto;
      }
    `}

  ${({isOpened:e})=>e?o.css`
          animation: ${s} ${n}ms forwards;
          height: 100%;
        `:o.css`
          animation: ${d} ${n}ms
            ${n}ms forwards;
          height: 0px;
        `}
`,u=r.default.div`
  display: flex;
  flex-flow: column;
  font-family: ${e=>e.theme.font.familyPrimary};
  position: fixed;
  bottom: 0px;
  color: ${t.getColorAlias("contentDefault")};
  background: ${t.getColorAlias("containerDefault")};
  border-radius: ${({theme:{radius:e}})=>`${e.roundedC} ${e.roundedC} ${e.roundedNone} ${e.roundedNone}`};
  min-width: 320px;
  box-shadow: rgb(0 0 0 / 20%) 0px -5px 9px -3px;

  animation: ${l} cubic-bezier(0.215, 0.61, 0.355, 1);
  animation-fill-mode: forwards;
  animation-duration: 300ms;
  width: 100%;
  z-index: 1000;

  ::after {
    content: '';
    background: ${t.getColorAlias("containerDefault")};
    height: 5%;
    width: 100%;
    position: absolute;
    bottom: -5%;
  }

  ${({position:e})=>{switch(e){case"left":return o.css`
          left: 0;
        `;case"right":return o.css`
          right: 0;
        `}}}

  ${({width:e})=>e?o.css`
          width: ${e};
        `:o.css`
          max-width: 480px;
        `}

  ${({height:e})=>e?o.css`
          height: ${e};
        `:o.css`
          max-height: 406px;
        `}
`,c=r.default.div`
  display: flex;
  flex-flow: column;
  flex-grow: 1;
  overflow: auto;
`,f=r.default.div.withConfig({shouldForwardProp:t.convertToTransientProps(["pinnedHeader","pinnedFooter"])})`
  ${({pinnedFooter:e})=>!e&&o.css`
      display: inline-flex;
      flex-flow: column;
      flex-grow: 1;
      justify-content: space-between;
    `}

  ${({pinnedHeader:e})=>e&&o.css`
      overflow-y: auto;
    `}
`,$=r.default.div.withConfig({shouldForwardProp:t.convertToTransientProps(["hasPullTab"])})`
  width: 100%;
  height: 20px;
  position: absolute;
  cursor: pointer;
  background: ${t.getColorAlias("containerDefault")};
  border-radius: ${({theme:{radius:e}})=>`${e.roundedC} ${e.roundedC} ${e.roundedNone} ${e.roundedNone}`};
  z-index: 1;

  ${({hasPullTab:e})=>e&&o.css`
      ::before {
        content: '';
        position: absolute;
        display: inline;
        top: 0px;
        left: 50%;
        transform: translate(-50%, 8px);
        width: 32px;
        height: 4px;
        background: ${t.getColorAlias("borderStrong")};
        border-radius: ${({theme:a})=>a.radius.roundedC};
      }
      background: unset;
    `}
`,m=r.default.div`
  border-radius: ${({theme:{radius:e}})=>`${e.roundedC} ${e.roundedC} ${e.roundedNone} ${e.roundedNone}`};
`;exports.BottomSheetWrapper=u;exports.CustomHeaderWrapper=m;exports.InnerWrapper=f;exports.MainContentWrapper=c;exports.Overlay=p;exports.PullTab=$;
