//
// Copyright 2021 Google LLC
// SPDX-License-Identifier: Apache-2.0
//
// [Modified by Sandlada & Kai Orion]
//
// Copyright 2025 Sandlada & Kai Orion
// SPDX-License-Identifier: MIT
//

@use 'sass:list';
@use '../../../tokens';

@mixin theme($tokens) {
    // prettier-ignore
    $supported-tokens: list.join(tokens.$md-comp-outlined-field-supported-tokens, (
        'container-shape-start-start',
        'container-shape-start-end',
        'container-shape-end-end',
        'container-shape-end-start'
    ));

    @each $token, $value in $tokens {
        @if list.index($supported-tokens, $token) ==null {
            @error 'Token `#{$token}` is not a supported token.';
        }

        @if $value {
            --md-outlined-field-#{$token}: #{$value};
        }
    }
}
