import { RIBBON_ID } from '../ribbon-base/ribbon-constants';
import { PageNumbersGroup } from './page-numbers-group';
import { OptionsGroup } from './options-group';
import { CloseGroup } from './close-group';
export var HEADER_FOOTER_TAB_ID = '_header_footer_tab';
/**
 * HeaderFooterTab module for document editor ribbon
 * @private
 */
var HeaderFooterTab = /** @class */ (function () {
    /**
     * Constructor for HeaderFooterTab
     * @param {DocumentEditorContainer} container - DocumentEditorContainer instance
     */
    function HeaderFooterTab(container) {
        this.container = container;
        this.localObj = this.container.localObj;
        this.commonID = this.container.element.id + RIBBON_ID;
        // Initialize group instances
        this.pageNumbersGroup = new PageNumbersGroup(container);
        this.optionsGroup = new OptionsGroup(container);
        this.closeGroup = new CloseGroup(container);
    }
    /**
     * Gets the HeaderFooter tab model for ribbon
     * @returns {RibbonTabModel} The header footer tab model
     */
    HeaderFooterTab.prototype.getHeaderFooterTab = function () {
        return {
            id: this.commonID + HEADER_FOOTER_TAB_ID,
            header: this.localObj.getConstant('Header & Footer'),
            keyTip: 'JH',
            groups: [
                this.pageNumbersGroup.getGroupModel(),
                this.optionsGroup.getGroupModel(),
                this.closeGroup.getGroupModel()
            ]
        };
    };
    /**
     * Updates the checkbox states based on current document settings
     * @returns {void}
     */
    HeaderFooterTab.prototype.updateCheckboxStates = function () {
        this.optionsGroup.updateSelection();
    };
    /**
     * Clean up resources
     * @returns {void}
     */
    HeaderFooterTab.prototype.destroy = function () {
        // Clean up group resources
        if (this.pageNumbersGroup.destroy) {
            this.pageNumbersGroup.destroy();
        }
        if (this.optionsGroup.destroy) {
            this.optionsGroup.destroy();
        }
        if (this.closeGroup.destroy) {
            this.closeGroup.destroy();
        }
        // Clear references
        this.pageNumbersGroup = undefined;
        this.optionsGroup = undefined;
        this.closeGroup = undefined;
    };
    return HeaderFooterTab;
}());
export { HeaderFooterTab };
