/**
 * DevExtreme (esm/__internal/ui/toolbar/strategy/m_toolbar.multiline.js)
 * Version: 23.2.9 (build 24294-0112)
 * Build date: Sun Oct 20 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";
var TOOLBAR_LABEL_CLASS = "dx-toolbar-label";
export class MultiLineStrategy {
    constructor(toolbar) {
        this._toolbar = toolbar
    }
    _initMarkup() {}
    _updateMenuVisibility() {}
    _renderMenuItems() {}
    _renderItem() {}
    _getMenuItems() {}
    _getToolbarItems() {
        var _a;
        return null !== (_a = this._toolbar.option("items")) && void 0 !== _a ? _a : []
    }
    _getItemsWidth() {
        return this._toolbar._getSummaryItemsSize("width", this._toolbar._itemElements(), true)
    }
    _arrangeItems() {
        var $label = this._toolbar._$toolbarItemsContainer.find(".".concat(TOOLBAR_LABEL_CLASS)).eq(0);
        if (!$label.length) {
            return
        }
        var elementWidth = getWidth(this._toolbar.$element());
        var labelPaddings = getOuterWidth($label) - getWidth($label);
        $label.css("maxWidth", elementWidth - labelPaddings)
    }
    _hideOverflowItems() {}
    _dimensionChanged() {}
    _itemOptionChanged() {}
    _optionChanged() {}
}
