/**
 * @license
 * Copyright 2023 Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
@use '@material/animation/animation' as mdc-animation;
@use './variables';
@use '../base/mixins' as base-mixins;
@use '../base/variables' as base-variables;
@use '../../theme';

@mixin core-styles() {
  @include base-mixins.core-styles;

  .forge-drawer__root {
    @include root;
  }

  .forge-drawer {
    &--mini {
      @include base;
  
      .forge-drawer__content {
        overflow: hidden;
      }
    }

    &--closed {
      width: 0;
    }
  }
}

@mixin host() {
  @include base-mixins.host;
  @include theme.css-custom-property(width, --forge-drawer-mini-width, variables.$width);

  overflow: visible !important;
}

@mixin host-right {
  @include theme.css-custom-property(min-width, --forge-drawer-mini-width, variables.$width);
  
  width: auto;
}

@mixin base() {
  @include theme.css-custom-property(width, --forge-drawer-mini-width, variables.$width);
  @include theme.z-index(surface);

  transform: translateX(0);
  transition-property: transform, width;
  transition: width 200ms mdc-animation.$standard-curve-timing-function;
}

@mixin root() {
  @include theme.z-index(surface);

  height: 100%;
}

@mixin hover() {
  @include theme.css-custom-property(width, --forge-drawer-width, base-variables.$width, true);

  transition: width 300ms mdc-animation.$standard-curve-timing-function variables.$transition-delay;
}
