@use "sass:map"

// this file contains the mixins

@mixin toggle-section-numbers($header, $toggle)
  @if $toggle == true
    #{$header} > span[class^="section-number"]:first-of-type
      display: inline // Uses the default display for the header
  @else
    #{$header} > span[class^="section-number"]:first-of-type
      display: none
  @endif

@mixin remove-section-number($element)
  #{$element} > span[class^="section-number"]:first-of-type 
    display: none

// @mixin set-header-color($header-color)
//   h1, h2, h3, h4, h5, h6
//     color: $header-color

@mixin set-header-colors($header-colors)
  @each $header, $size in $header-colors
    #{$header}
      color: #{$size}

@mixin set-header-sizes($header-sizes)
  @each $header, $size in $header-sizes
    #{$header}
      font-size: #{$size}

@mixin adjust-header-size($scale-factor, $header-sizes)
  @each $header, $size in $header-sizes
    #{$header}
      font-size: calc(#{$scale-factor} * #{$size})

// Function to return the font size from the $header-styles map
@function get-header-property($element, $property)
  $element-styles: map.get($header-styles, $element) // Get the styles for the element
  @return map.get($element-styles, $property) // Return the requested property value
