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

@mixin provide-theme($theme) {
  @include theme.theme-properties(avatar, $theme, variables.$theme-values);
}

@mixin core-styles() {
  .forge-avatar {
    @include base;
  }
}

@mixin host() {
  display: inline-block;
  contain: content;
}

@mixin base() {
  @include typography-mixins.typography(title);
  @include theme.css-custom-property(font-size, --forge-avatar-font-size, variables.$font-size);
  @include theme.css-custom-property(font-weight, --forge-avatar-font-weight, variables.$font-weight);
  @include theme.css-custom-property(background-color, --forge-avatar-theme-background, variables.$background);
  @include theme.css-custom-property(height, --forge-avatar-size, variables.$size);
  @include theme.css-custom-property(width, --forge-avatar-size, variables.$size);
  @include theme.css-custom-property(color, --forge-avatar-theme-on-background, variables.$on-background);
  @include theme.css-custom-property(border-radius, --forge-avatar-radius, variables.$border-radius);
  
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
  transition: height variables.$transition-duration animation-variables.$standard-curve-timing-function, 
              width variables.$transition-duration animation-variables.$standard-curve-timing-function;
}
