"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useLogic = void 0;
const utils_1 = require("../utils");
const useLogic = ({ value, type, color }) => {
    const isExpandable = type === 'object' || type === 'array';
    const isCanCopy = typeof value === 'string' || typeof value === 'number';
    const isGuid = type === 'guid';
    const itemCount = (0, utils_1.getItemCount)(value);
    const expandableText = type === 'array' ? `[${itemCount}]` : `{${itemCount}}`;
    const formattedValue = (0, utils_1.formatValue)(value, type);
    return {
        isExpandable,
        isCanCopy,
        isGuid,
        expandableText,
        formattedValue,
        color,
    };
};
exports.useLogic = useLogic;
