//#region src/plus/clientName/utils.ts
const getClientName = (dataSource) => {
	if (!dataSource || typeof dataSource === "string") return dataSource;
	const { first_name, last_name, display_name, nickname } = dataSource;
	let finalName = "";
	if (display_name) finalName = display_name;
	else if (nickname) finalName = nickname;
	else if (first_name || last_name) finalName = `${first_name} ${last_name}`.trim();
	return finalName;
};
//#endregion
export { getClientName };
