"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useLogic = void 0;
const hooks_1 = require("../../OverflowTypography/hooks");
const utils_1 = require("./utils");
const useLogic = ({ ref: forwardedRef, children, }) => {
    const { ref, isOverflowed } = (0, hooks_1.useOverflowed)(forwardedRef);
    const { baseName, suffixWithExtension } = (0, utils_1.truncateString)(children);
    return {
        baseNameProps: { ref, children: baseName },
        isOverflowed,
        suffixWithExtension,
    };
};
exports.useLogic = useLogic;
