@use 'sass:map';
@use '@angular/material' as mat;

@mixin adf-breadcrumb-theme($theme) {
    $config: mat.m2-get-color-config($theme);
    $foreground-palette: map.get($config, foreground);
    $primary-palette: map.get($config, primary);
    $text-color: mat.m2-get-color-from-palette($foreground-palette, text);
    $primary: mat.m2-get-color-from-palette($primary-palette, text);

    adf-breadcrumb {
        .adf-breadcrumb__show-all-button-icon--rotate {
            color: mat.m2-get-color-from-palette($primary-palette, 500);
        }

        .adf-breadcrumb__item-wrapper {
            a,
            a:active,
            a:visited {
                color: $primary;
            }

            &:last-child a {
                text-decoration: none;
                color: $text-color;
            }

            &:last-child a:hover {
                text-decoration: none;
            }
        }
    }
}
