import type { ValueOf } from "@ax/helpers/types";
import { LOCALE } from "@ax/locales";

// TODO: localize strings...
const itemLabel = {
	COTENT_TYPE: LOCALE.entityLabel.contentType,
	SIMPLE_CONTENT_TYPE: LOCALE.entityLabel.simpleContentType,
	PAGE_CONTENT_TYPE: LOCALE.entityLabel.pageContentType,
	CATEGORY: LOCALE.entityLabel.category,
	PAGE: LOCALE.entityLabel.page,
	GLOBAL_PAGE: LOCALE.entityLabel.globalPage,
	CONTENT: LOCALE.entityLabel.content,
	ITEM: LOCALE.entityLabel.item,
	REDIRECT: LOCALE.entityLabel.redirect,
	ADDON: LOCALE.entityLabel.addon,
	FILE: LOCALE.entityLabel.file,
	IMAGE: LOCALE.entityLabel.image,
	FORM: LOCALE.entityLabel.form,
	SITE: LOCALE.entityLabel.site,
	NAVIGATION: LOCALE.entityLabel.navigation,
	USER: LOCALE.entityLabel.user,
	ROL: LOCALE.entityLabel.rol,
} as const;

type ItemLabel = ValueOf<typeof itemLabel>;

const VALID_IMAGE_FORMATS = ["jpeg", "jpg", "png", "svg", "gif", "webp"];
const VALID_DOCUMENT_FORMATS = ["pdf", "doc", "docx", "xls", "xlsx", "zip", "csv", "txt"];
const VALID_VIDEO_FORMATS = ["mov", "mp4", "wmv", "avi", "webm", "mkv"];
const VALID_FILE_FORMATS = [...VALID_DOCUMENT_FORMATS, ...VALID_VIDEO_FORMATS];

const GRIDDO_ID = "___griddo" as const;

export {
	itemLabel,
	type ItemLabel,
	VALID_IMAGE_FORMATS,
	VALID_DOCUMENT_FORMATS,
	VALID_VIDEO_FORMATS,
	VALID_FILE_FORMATS,
	GRIDDO_ID,
};
