"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useLogic = void 0;
const react_1 = require("react");
const classNames_1 = require("../../utils/classNames");
const constants_1 = require("../constants");
const useLogic = ({ icon, iconPosition = 'left' }) => {
    const classnames = (0, react_1.useMemo)(() => (0, classNames_1.classNames)(constants_1.descriptionCellClassnames.root, {
        [constants_1.descriptionCellClassnames.hasIcon]: Boolean(icon),
        [constants_1.descriptionCellClassnames.iconRight]: Boolean(icon) && iconPosition === 'right',
    }), [icon, iconPosition]);
    return { classnames };
};
exports.useLogic = useLogic;
