@use "sass:map";
@use "../core/_index.scss" as *;

/// The width of the border around the Dialog.
/// @group dialog
$kendo-dialog-border-width: 0 !default;

/// The background color of the Dialog titlebar.
/// @group dialog
$kendo-dialog-titlebar-bg: var( --kendo-component-bg, initial ) !default;
/// The text color of the Dialog titlebar.
/// @group dialog
$kendo-dialog-titlebar-text: var( --kendo-component-text, initial ) !default;
/// The border color of the Dialog titlebar.
/// @group dialog
$kendo-dialog-titlebar-border: var( --kendo-component-border, initial ) !default;
/// The width of the border around the Dialog titlebar.
/// @group dialog
$kendo-dialog-titlebar-border-width: 0 !default;
/// The horizontal padding of the Dialog titlebar.
/// @group dialog
$kendo-dialog-titlebar-padding-x: k-spacing(6) !default;
/// The vertical padding of the Dialog titlebar.
/// @group dialog
$kendo-dialog-titlebar-padding-y: k-spacing(4) !default;

/// The horizontal padding of the content of the Dialog.
/// @group dialog
$kendo-dialog-inner-padding-x: k-spacing(6) !default;
/// The vertical padding of the content of the Dialog.
/// @group dialog
$kendo-dialog-inner-padding-y: k-spacing(3) !default;

/// The horizontal padding of the Dialog action buttons.
/// @group dialog
$kendo-dialog-buttongroup-padding-x: k-spacing(6) !default; // $kendo-actions-padding-x
/// The vertical padding of the Dialog action buttons.
/// @group dialog
$kendo-dialog-buttongroup-padding-y: k-spacing(6) !default; // $kendo-actions-padding-y
/// The width of the top border of the Dialog action buttons.
/// @group dialog
$kendo-dialog-buttongroup-border-width: 0 !default;
/// The spacing between the Dialog action buttons.
/// @group dialog
$kendo-dialog-buttongroup-spacing: k-spacing(3) !default;

/// The spacing between the Dialog action buttons.
/// @group dialog
$kendo-dialog-button-spacing: k-spacing(2) !default; // $kendo-actions-padding-y

/// The box shadow around the Dialog.
/// @group dialog
$kendo-dialog-shadow: var( --kendo-box-shadow-depth-8, none ) !default;

/// The theme variations for the Dialog.
$kendo-dialog-brand-colors: (
    primary: primary
 ) !default;

// Matrix with dialog theme colors in the order: bg, color, border
$_tc-dialog-matrix: (
    (normal: if($kendo-enable-color-system, (color, on-color, color), (100, $kendo-color-white, 100))),
) !default;

$_tc-dialog-dark-matrix: (
    (normal: if($kendo-enable-color-system, (color, on-color, color), (160, $kendo-color-white, 160))),
) !default;

$_tc-dialog-light-matrix: (
    (normal: if($kendo-enable-color-system, (color, on-color, color), (50, 160, 50))),
) !default;

/// The theme colors map for the Dialog.
$kendo-dialog-theme-colors: () !default;

@each $ui-states in $_tc-dialog-matrix {
    @each $brand-color, $palette in $kendo-dialog-brand-colors {
        $kendo-dialog-theme-colors: map.deep-merge(
            $kendo-dialog-theme-colors,
            k-generate-theme-variation( $brand-color, $palette, $ui-states )
        );
    };
}

@each $ui-states in $_tc-dialog-dark-matrix {
    $kendo-dialog-theme-colors: map.deep-merge(
        $kendo-dialog-theme-colors,
        k-generate-theme-variation( dark, if($kendo-enable-color-system, dark, neutral), $ui-states )
    );
}

@each $ui-states in $_tc-dialog-light-matrix {
    $kendo-dialog-theme-colors: map.deep-merge(
        $kendo-dialog-theme-colors,
        k-generate-theme-variation( light, if($kendo-enable-color-system, light, neutral), $ui-states )
    );
}
