export enum ExplorerDataType {
	TRANSACTION = "transaction",
	TOKEN = "token",
	ADDRESS = "address",
	BLOCK = "block",
}

export const getExplorerLink = (
	baseUrl: string,
	data: string,
	type: ExplorerDataType,
): string => {
	if (!data) return "";
	switch (type) {
		case ExplorerDataType.TRANSACTION: {
			// biome-ignore format:
			return `${baseUrl}/tx/${data}`;
		}
		case ExplorerDataType.TOKEN: {
			// biome-ignore format:
			return `${baseUrl}/token/${data}`;
		}
		case ExplorerDataType.BLOCK: {
			// biome-ignore format:
			return `${baseUrl}/block/${data}`;
		}
		default: {
			// biome-ignore format:
			return `${baseUrl}/address/${data}`;
		}
	}
};
