@charset "UTF-8";

// @description
// * overflow-x mixin.
// * This mixin generates CSS logical properties for overflow-x.
// * It will generate overflow-x & overflow-inline properties.

// @access public

// @version 1.0.0

// @author Khaled Mohamed

// @license MIT

// @repository: https://github.com/Black-Axis/sass-pire

// @namespace logical-props

// @module logical-props/overflow-x

// @dependencies:
// * - meta.type-of (SASS function).
// * - list.index (SASS function).
// * - var.$overflow-values (variable).
// * - Error.throw (function).

// @example
// * .example {
// *   @include overflow-x(hidden);
// * }

// @output
// * .example {
// *    overflow-inline: hidden;
// *    overflow-x: hidden;
// * }

@use "sass:meta";
@use "sass:list";
@use "sass:math";
@use "../../abstract/global-variables" as var;
@use "../../development-utils/toggle-error-message" as Error;

@mixin overflow-x($value: visible) {
    @if meta.type-of($value) != string {
        content: Error.throw("The parameter of overflow-x mixin must be in a string type.");
    } @else {
        @if list.index(var.$overflow-values, $value) {
            overflow-x: $value;
            overflow-inline: $value;
        } @else {
            content: Error.throw("The parameter of overflow-x mixin must be one of these values: (#{var.$overflow-values}).");
        }
    }
}

@mixin o-f-x($value: visible) {
    @include overflow-x($value);
}
