@use 'sass:string';

@mixin indentation-creator($className, $indentationName, $direction, $maxCount: 200) {
    @for $i from 1 through $maxCount {
        .#{$className}-#{$i} {
            #{$indentationName}-#{$direction}: #{$i}px;
        }
    }
}

@mixin indentation-creator-list($indentationName) {
    $direction-name-list: (top, left, bottom, right);

    @each $direction in $direction-name-list {
        @include indentation-creator(
            #{string.slice($indentationName, 0, 1)}#{string.slice($direction, 0, 1)},
            $indentationName,
            $direction
        );
    }
}