@charset "UTF-8";

// @description
// * align-items mixin.
// * This mixin provides a convenient way to set the `align-items`
// * property with vendor prefixes for better cross-browser compatibility.

// @access public

// @version 1.3.1

// @author Khaled Mohamed

// @license MIT

// @repository: https://github.com/Black-Axis/sass-pire

// @reference: https://developer.mozilla.org/en-US/docs/Web/CSS/align-items

// @namespace main-props

// @module main-props/align-items

// @dependencies:
// * - var.$align-items-props (variable).
// * - var.$align-items-values (variable).
// * - LibFunc.is-in-list (function).
// * - Error.throw (function).

// @param {String} $value
// * The value for the `align-items` property.
// * Allowed values: normal, stretch, start, end, flex-start, flex-end,
// * center, baseline, inherit.
// * Default: normal.

// @throws {Error}
// * Throws an error if the provided $value is not one of
// * the allowed values.

// @example
// * .example {
// *   @include align-items(center);
// * }

// @output
// * .example {
// *   -webkit-box-align: center;
// *   -webkit-align-items: center;
// *   -ms-flex-align: center;
// *   -moz-align-items: center;
// *   align-items: center;
// * }

// @note
// * There are two mixins in this file.
// * The first is the (align-items) mixin and second is (a-i) mixin.
// * The second one is for only simplicity when using (align-items) mixin.
// * The core logic of (a-i) mixin is to call the first one.
// * You can use one of them as you want.

@use "../../../abstract/global-variables" as var;
@use "../../../development-utils/toggle-error-message" as Error;
@use "../../../functions/global/is-in-list" as LibFunc;

@mixin align-items($value: normal) {
    @if LibFunc.is-in-list(var.$align-items-values, $value) {
        @each $prop in var.$align-items-props {
            #{$prop}: $value;
        }
    } @else {
        content: Error.throw("The parameter of align-items mixin must be one of: (#{var.$align-items-values}).");
    }
}

@mixin a-i($value: normal) {
    @include align-items($value);
}
