/**
 * DevExtreme (esm/__internal/ui/toolbar/strategy/m_toolbar.multiline.js)
 * Version: 24.1.7-build-24272-1937
 * Build date: Sat Sep 28 2024
 *
 * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
import {
    getOuterWidth,
    getWidth
} from "../../../../core/utils/size";
const TOOLBAR_LABEL_CLASS = "dx-toolbar-label";
export class MultiLineStrategy {
    constructor(toolbar) {
        this._toolbar = toolbar
    }
    _initMarkup() {}
    _updateMenuVisibility() {}
    _renderMenuItems() {}
    _renderItem() {}
    _getMenuItems() {}
    _getToolbarItems() {
        return this._toolbar.option("items") ?? []
    }
    _getItemsWidth() {
        return this._toolbar._getSummaryItemsSize("width", this._toolbar._itemElements(), true)
    }
    _arrangeItems() {
        const $label = this._toolbar._$toolbarItemsContainer.find(".dx-toolbar-label").eq(0);
        if (!$label.length) {
            return
        }
        const elementWidth = getWidth(this._toolbar.$element());
        const labelPaddings = getOuterWidth($label) - getWidth($label);
        $label.css("maxWidth", elementWidth - labelPaddings)
    }
    _hideOverflowItems() {}
    _dimensionChanged() {}
    _itemOptionChanged() {}
    _optionChanged() {}
}
