import { isVegaModalSectionPaddingType } from '../../../../types/type-guard';
/**
 * Represents the modal section padding state.
 */
export class VegaModalSectionPaddingState {
  constructor(padding) {
    if (isVegaModalSectionPaddingType(padding)) {
      this.sectionPadding = Object.assign({}, VegaModalSectionPaddingState.defaultSectionPadding, padding);
    }
    else {
      const isEmptyPadding = !padding || (typeof padding === 'object' && Object.keys(padding).length === 0);
      const paddingValue = isEmptyPadding
        ? VegaModalSectionPaddingState.defaultPadding
        : padding;
      this.sectionPadding = {
        header: paddingValue,
        content: paddingValue,
        footer: paddingValue,
      };
    }
  }
  /**
   * Gets the padding for the header section of the modal.
   *
   * @returns {ResponsiveType<PaddingType>} The padding for the header section.
   */
  getHeaderPadding() {
    return this.sectionPadding.header;
  }
  /**
   * Gets the padding for the content section of the modal.
   *
   * @returns {ResponsiveType<PaddingType>} The padding for the content section.
   */
  getContentPadding() {
    return this.sectionPadding.content;
  }
  /**
   * Gets the padding for the footer section of the modal.
   *
   * @returns {ResponsiveType<PaddingType>} The padding for the footer section.
   */
  getFooterPadding() {
    return this.sectionPadding.footer;
  }
}
VegaModalSectionPaddingState.defaultPadding = 'size-24';
VegaModalSectionPaddingState.defaultSectionPadding = {
  header: {
    x: VegaModalSectionPaddingState.defaultPadding,
    top: VegaModalSectionPaddingState.defaultPadding,
    bottom: 'size-16',
  },
  content: { x: VegaModalSectionPaddingState.defaultPadding, y: '0' },
  footer: VegaModalSectionPaddingState.defaultPadding,
};
