import { titleize } from '../utils';
export function useShownMemberName(props) {
    let { cubeName, cubeTitle, memberName, memberTitle, type = 'name' } = props;
    memberName = memberName.split('.')[1] ?? memberName;
    const shownCubeName = type === 'name' ? cubeName : (cubeTitle ?? titleize(cubeName));
    const shownMemberName = type === 'name' ? memberName : (memberTitle ?? titleize(memberName));
    const shownFullName = `${shownCubeName}${type === 'name' ? '.' : ' '}${shownMemberName}`;
    const isAutoCubeName = cubeTitle && cubeName === titleize(cubeTitle);
    const isAutoMemberName = memberTitle && memberName === titleize(memberTitle);
    const isAutoName = isAutoCubeName && isAutoMemberName;
    return {
        shownCubeName,
        shownMemberName,
        shownFullName,
        isAutoName,
        isAutoMemberName,
        isAutoCubeName,
    };
}
//# sourceMappingURL=shown-member-name.js.map