"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useLogic = void 0;
const react_1 = require("react");
const hooks_1 = require("./hooks");
const useLogic = ({ items, alignNameWidth, leader }) => {
    const descriptionItems = (0, hooks_1.useGroupedDescriptionItems)({ items });
    const getDescriptionListStyles = () => {
        if (!alignNameWidth) {
            return {};
        }
        return { '--name-desktop-width': alignNameWidth };
    };
    (0, react_1.useEffect)(() => {
        if (leader && alignNameWidth) {
            // biome-ignore lint/suspicious/noConsole: Сообщение для интеграторов
            console.error('DescriptionList: Параметры leader и alignNameWidth не могут быть использованы вместе');
        }
    }, [leader, alignNameWidth]);
    return {
        descriptionItems,
        descriptionListStyles: getDescriptionListStyles(),
    };
};
exports.useLogic = useLogic;
