@use '@angular/material'as mat;

@mixin popup-theme($theme) {
    $primary: map-get($theme, primary);
    $background: map-get($theme, background);
    $warn: map-get($theme, warn);

    deja-popup-box {
        background-color: mat.get-color-from-palette($primary);
        color: mat.get-color-from-palette($primary, default-contrast);

        .deja-popup-box-actions {
            background-color: mat.get-color-from-palette($background, hover);
        }

        .deja-popup-box-content {
            button {
                &:hover {
                    background-color: mat.get-color-from-palette($background, focused-button);
                }
            }
        }
    }

    deja-popup-toolbar {
        background-color: mat.get-color-from-palette($primary);

        .deja-popup-toolbar-mini {
            color: mat.get-color-from-palette($primary, default-contrast);
        }

        .mat-toolbar {

            &.mat-warn {
                background-color: mat.get-color-from-palette(mat.$orange-palette, 500);
                color: mat.get-color-from-palette(mat.$orange-palette, default-contrast);
            }

            &.mat-danger {
                background: mat.get-color-from-palette($warn);
                color: mat.get-color-from-palette($warn, default-contrast);
            }
        }
    }

    deja-popup-tray {
        background-color: mat.get-color-from-palette($background, status-bar);
    }
}