@use '../mixins/function.scss' as *;
@use '../mixins/mixins.scss' as *;

@include b(drawer) {
  word-break: break-word;
  position: absolute;
  box-shadow: getCssVar('shadow', '1');
  background-color: getCssVar('color', 'bg-3');
  color: getCssVar('color', 'text-1');
  box-sizing: border-box;
  pointer-events: all;
  @include m(left) {
    top: 0;
    bottom: 0;
    left: 0;
    @include be(drawer, trigger) {
      width: 6px;
      height: 100%;
      top: 0;
      right: 0;
      cursor: ew-resize;
      @include when(dragging) {
        &::before {
          content: '';
          position: absolute;
          top: 0;
          right: 0;
          width: 2px;
          height: 100%;
          background-color: getCssVar('color', 'primary-6');
          z-index: 1;
        }
      }
    }
  }
  @include m(right) {
    top: 0;
    bottom: 0;
    right: 0;
    @include be(drawer, trigger) {
      width: 6px;
      height: 100%;
      top: 0;
      left: 0;
      cursor: ew-resize;
      @include when(dragging) {
        &::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          width: 2px;
          height: 100%;
          background-color: getCssVar('color', 'primary-6');
          z-index: 1;
        }
      }
    }
  }
  @include m(top) {
    top: 0;
    left: 0;
    right: 0;
    @include be(drawer, trigger) {
      width: 100%;
      height: 6px;
      bottom: 0;
      left: 0;
      cursor: ns-resize;
      @include when(dragging) {
        &::before {
          content: '';
          position: absolute;
          bottom: 0;
          left: 0;
          width: 100%;
          height: 2px;
          background-color: getCssVar('color', 'primary-6');
          z-index: 1;
        }
      }
    }
  }
  @include m(bottom) {
    bottom: 0;
    left: 0;
    right: 0;
    @include be(drawer, trigger) {
      width: 100%;
      height: 6px;
      top: 0;
      left: 0;
      cursor: ns-resize;
      @include when(dragging) {
        &::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          width: 100%;
          height: 2px;
          background-color: getCssVar('color', 'primary-6');
          z-index: 1;
        }
      }
    }
  }
  @include e(container) {
    inset: 0;
    pointer-events: none;
  }
  @include e(mask) {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    pointer-events: all;
    backdrop-filter: blur(3px);
    background-color: rgba(0, 0, 0, 0.5);
  }
  @include e(wrapper) {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
  }
  @include e(trigger) {
    position: absolute;
    background-color: #0000;
    transition: background-color 0.3s getCssVar('bezier', '1');
  }
  @include e(header) {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
  @include e(title) {
    flex: 1;
  }
  @include e(body) {
    flex: 1;
  }
  @include e(content) {
  }
  @include e(footer) {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
  }
}
