import { LOCALE } from "@ax/locales";

// TODO: Tipar las acciones para que no sean cualquier string...
// export type BulkActions = "publish" | "unpublish" | "delete" | "processing" | "Move to" | "Deativate";

/**
 * Returns the appropriate loading text for bulk actions based on the current action and loading state.
 *
 * @param currentAction - The current action being performed ("publish", "unpublish", "delete", etc.).
 * @returns The localized loading message corresponding to the current bulk action.
 */
export const getBulkLoadingText = (currentAction: string) => {
	const options = {
		publish: LOCALE.common.publishing,
		unpublish: LOCALE.common.unpublishing,
		delete: LOCALE.common.deleting,
		processing: LOCALE.common.processing,
		download: LOCALE.common.downloading,
		"Move to": LOCALE.common.moving,
		Deactivate: LOCALE.common.deactivating,
		Activate: LOCALE.common.activating,
	};

	return options[currentAction as keyof typeof options] || options.processing;
};
