@use 'sass:map';
@use 'sass:list';
@use './../type';
@use '../../tokens/components';
@use '../../tokens/utilities';
@use '../../functions/tokens';

tokens.$default-map: components.$post-banner;

$notification-body-gap: tokens.get('utility-gap-4', utilities.$post-spacing) !default;
$notification-font-weight: type.$font-weight-normal !default;
$notification-link-font-weight: type.$font-weight-normal !default;

$notification-gap-map: () !default;
$notification-gap-map: map.merge(
  $notification-gap-map,
  (
    'banner': tokens.get('banner-gap'),
    'toast': tokens.get('toast-spacing-gap-outer', components.$post-toast),
  )
);

$notification-padding-x-map: () !default;
$notification-padding-x-map: map.merge(
  $notification-padding-x-map,
  (
    'banner': tokens.get('banner-padding'),
    'toast': tokens.get('toast-spacing-padding-inline', components.$post-toast),
  )
);

$notification-padding-y-map: () !default;
$notification-padding-y-map: map.merge(
  $notification-padding-y-map,
  (
    'banner': tokens.get('banner-padding'),
    'toast': tokens.get('toast-spacing-padding-block', components.$post-toast),
  )
);

$notification-hr-margin-block-map: () !default;
$notification-hr-margin-block-map: map.merge(
  $notification-hr-margin-block-map,
  (
    'banner': tokens.get('utility-gap-8', utilities.$post-spacing)
    tokens.get('utility-gap-12', utilities.$post-spacing),
    'toast': tokens.get('utility-gap-4', utilities.$post-spacing)
    tokens.get('utility-gap-12', utilities.$post-spacing),
  )
);

$notification-elevation-map: () !default;
$notification-elevation-map: map.merge(
  $notification-elevation-map,
  (
    'banner': tokens.get('banner-elevation'),
    'toast': tokens.get('toast-elevation', components.$post-toast),
  )
);

$notification-icon-size-map: () !default;
$notification-icon-size-map: map.merge(
  $notification-icon-size-map,
  (
    'banner': tokens.get('banner-icon-size'),
    'toast': tokens.get('toast-sizing-icon', components.$post-toast),
  )
);

$notification-variants: () !default;
$notification-variants: list.join(
  $notification-variants,
  (
    'info' tokens.get('banner-info-bg') var(--post-signal-icon-info)
    tokens.get('banner-info-border-color') tokens.get('banner-info-icon-color')
    tokens.get('post-banner-info-bg-scheme'),
    'success' tokens.get('banner-success-bg') var(--post-signal-icon-success)
    tokens.get('banner-success-border-color') tokens.get('banner-success-icon-color')
    tokens.get('post-banner-success-bg-scheme'),
    'warning' tokens.get('banner-warning-bg') var(--post-signal-icon-warning)
    tokens.get('banner-warning-border-color') tokens.get('banner-warning-icon-color')
    tokens.get('post-banner-warning-bg-scheme'),
    'error' tokens.get('banner-error-bg') var(--post-signal-icon-error)
    tokens.get('banner-error-border-color') tokens.get('banner-error-icon-color')
    tokens.get('post-banner-error-bg-scheme')
  )
);
