////
///
/// List Typography Mixins Module
/// ===========================================================================
/// ...
///
/// @group List
/// @author Scape Press
/// @link https://scape.style
/// @since 0.1.0 initial release
/// @todo None
/// @access public
///
////

// ============================================================================
// Use
// ============================================================================

@use "../../../01-core/external" as *;
@use "../../../12-lexicon/tokens" as *;

@use "../../character" as *;
@use "../../font" as *;

@use "../base/list-base.mixins" as *;
// @use "../style/list-style.mixins" as *;

// ============================================================================
// Type | List | List Styles
// ============================================================================

// Generic Mixins
// ============================================================================
// https://developer.mozilla.org/en-US/docs/Web/CSS/list-style

// Generic mixin for setting list style type
// ----------------------------------------------------------------------------
// https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type

/// Generic mixin for setting list style type.
///
/// This mixin allows you to define the type of bullet or numbering style for list items.
///
/// @param {String} $type - The list style type (default: `disc`).
/// @example scss
///   @include list_style_type(square);
@mixin list_style_type($type: disc) {
    list-style-type: $type;
}

// Generic mixin for setting list style position
// ----------------------------------------------------------------------------
// https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-position

/// Generic mixin for setting list style position.
///
/// This mixin allows you to define whether the bullet or numbering is placed inside or outside the content box.
///
/// @param {String} $position - The list style position (default: `outside`).
/// @example scss
///   @include list_style_position(inside);
@mixin list_style_position($position: outside) {
    list-style-position: $position;
}

// Generic mixin for setting list style position
// ----------------------------------------------------------------------------
// https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-image

/// Generic mixin for setting list style image.
///
/// This mixin allows you to define a custom image as the marker for list items.
///
/// @param {String} $image - The URL of the image to use as a marker (default: `none`).
/// @example scss
///   @include list_style_image(url('path/to/image.png'));
@mixin list_style_image($image: none) {
    list-style-image: $image;
}

/// Mixin for setting a custom marker image.
/// ---------------------------------------------------------------------------
///
/// This mixin allows you to easily apply a custom image as a list marker.
///
/// @param {String} $image-url - The URL of the custom image.
@mixin custom-marker($image-url: "") {
    list-style-image: url($image-url);
}

// Base Mixins for List Styles
// ----------------------------------------------------------------------------

// Mixins for each list style using the generic mixin
// ----------------------------------------------------------------------------

/// Mixin to remove list item markers.
/// ---------------------------------------------------------------------------
///
/// This mixin sets the list style to `none`, removing any default markers.
@mixin list_none {
    @include list_style_type(none);
    & > * {
        @include list_style_type(none);
    }
}

/// Mixin to set list item markers to filled circles.
/// ---------------------------------------------------------------------------
///
/// This mixin sets the list style to `disc`, which is the default filled circle marker.
@mixin list_disc {
    @include list_style_type(disc);
}

/// Mixin to set list item markers to hollow circles.
/// ---------------------------------------------------------------------------
///
/// This mixin sets the list style to `circle`, which uses a hollow circle marker.
@mixin list_circle {
    @include list_style_type(circle);
}

/// Mixin to set list item markers to filled squares.
/// ---------------------------------------------------------------------------
///
/// This mixin sets the list style to `square`, using a filled square marker.
@mixin list_square {
    @include list_style_type(square);
}

/// Mixin to set list item markers to decimal numbers.
/// ---------------------------------------------------------------------------
///
/// This mixin sets the list style to `decimal`, which uses numbers starting from 1.
@mixin list_decimal {
    @include list_style_type(decimal);
}

/// Mixin to set list item markers to Han decimal numbers.
/// ---------------------------------------------------------------------------
///
/// This mixin sets the list style to `cjk-decimal`, which uses Chinese, Japanese, and Korean numbering.
@mixin list_decimal_cjk {
    @include list_style_type(cjk-decimal);
}

/// Mixin to set list item markers to decimal numbers with leading zeros.
/// ---------------------------------------------------------------------------
///
/// This mixin sets the list style to `decimal-leading-zero`, which adds leading zeros to the numbers.
@mixin list_decimal_leading_zero {
    @include list_style_type(decimal-leading-zero);
}

/// Mixin to set list item markers to lowercase Roman numerals.
/// ---------------------------------------------------------------------------
///
/// This mixin sets the list style to `lower-roman`, using lowercase Roman numerals.
@mixin list_roman_lower {
    @include list_style_type(lower-roman);
}

/// Mixin to set list item markers to uppercase Roman numerals.
/// ---------------------------------------------------------------------------
///
/// This mixin sets the list style to `upper-roman`, using uppercase Roman numerals.
@mixin list_roman_upper {
    @include list_style_type(upper-roman);
}

/// Mixin to set list item markers to lowercase Greek letters.
/// ---------------------------------------------------------------------------
///
/// This mixin sets the list style to `lower-greek`, using lowercase Greek letters.
@mixin list_greek_lower {
    @include list_style_type(lower-greek);
}

/// Mixin to set list item markers to lowercase ASCII letters.
/// ---------------------------------------------------------------------------
///
/// This mixin sets the list style to `lower-alpha`, using lowercase ASCII letters.
@mixin list_alpha_lower {
    @include list_style_type(lower-alpha);
}

@mixin list_latin_lower {
    @include list_alpha_lower;
} // lower-latin is an alias for lower-alpha

/// Mixin to set list item markers to uppercase ASCII letters.
/// ---------------------------------------------------------------------------
///
/// This mixin sets the list style to `upper-alpha`, using uppercase ASCII letters.
@mixin list_alpha_upper {
    @include list_style_type(upper-alpha);
}

@mixin list_latin_upper {
    @include list_alpha_upper;
} // upper-latin is an alias for upper-alpha
