import { isFireFox } from "./compatibility";
const jsonProxyUrl = process.env.PROXY1;
const jsonProxyUrl2 = process.env.PROXY2;
const imageProxyStart = 'https://ik.imagekit.io/p/';
const imageProxyEnd = '?tr=n-card';
export const jsonProxy = url => `${jsonProxyUrl}${encodeURIComponent(url)}`;
export const jsonProxy2 = url => `${jsonProxyUrl2}${encodeURIComponent(url)}`;
export const imageProxy = url => `${imageProxyStart}${encodeURIComponent(url)}${imageProxyEnd}`;
export const avatarProxy = address => `https://context.app/api/avatar/${address}?size=40`;
export const revokeJsonProxy = url => decodeURIComponent(url.replaceAll(jsonProxyUrl, '').replaceAll(encodeURIComponent(jsonProxyUrl), ''));
export const revokeJsonProxy2 = url => decodeURIComponent(url.replaceAll(jsonProxyUrl2, '').replaceAll(encodeURIComponent(jsonProxyUrl2), ''));
export const revokeImageProxy = url => decodeURIComponent(url.replaceAll(imageProxyStart, '').replaceAll(imageProxyEnd, ''));
let version = '0.5.11';
if (isFireFox()) {
  version = '0.4.8';
}
export const LATEST_VERSION = version;
export const defaultplatform = 'Marketplace';
export const defaultplatformInExplore = 'Marketplace';
export let PAGE;
(function (PAGE) {
  PAGE["LOGIN"] = "Login";
  PAGE["HOME"] = "Home";
  PAGE["SPACE"] = "Space";
  PAGE["EXPLORE"] = "Explore";
  PAGE["FEEDS"] = "Feeds";
  PAGE["DATA"] = "Data";
  PAGE["SETTINGS"] = "Settings";
})(PAGE || (PAGE = {}));
export let CollectionType;
(function (CollectionType) {
  CollectionType["ALL"] = "Curated";
  CollectionType["CREATED"] = "Created";
  CollectionType["OWNED"] = "Owned";
  CollectionType["PAID"] = "Paid";
  CollectionType["UNTITLED"] = "Untitled";
  CollectionType["Collections"] = "Collections";
  CollectionType["EXPLORE"] = "Explore";
  CollectionType["FEEDS"] = "Feeds";
})(CollectionType || (CollectionType = {}));
export let StorageType;
(function (StorageType) {
  StorageType["DID"] = "DID";
  StorageType["AVATAR"] = "AVATAR";
  StorageType["LNG"] = "i18nextLng";
  StorageType["TUTORIAL_VISIBLE"] = "TUTORIAL_VISIBLE";
  StorageType["API_TOKEN"] = "API_TOKEN";
})(StorageType || (StorageType = {}));
export let FeedsType;
(function (FeedsType) {
  FeedsType["Community"] = "Community";
  FeedsType["Collectors"] = "Collectors";
  FeedsType["Artists"] = "Artists";
  FeedsType["Loot"] = "Loot";
  FeedsType["Punk"] = "CryptoPunk";
  FeedsType["FWB"] = "FWB";
  FeedsType["FingerprintsDAO"] = "Fingerprint";
  FeedsType["Followings"] = "Followings";
})(FeedsType || (FeedsType = {}));
export let EventType;
(function (EventType) {
  EventType["mint"] = "minted";
  EventType["bid"] = "bid";
  EventType["buy"] = "purchased";
  EventType["sale"] = "sold";
  EventType["transfer"] = "transferred";
})(EventType || (EventType = {}));
export const typeArray = ['NFT', 'Mirror', 'Video', 'File', 'Website', 'Folder'];
export let BookmarkType;
(function (BookmarkType) {
  BookmarkType[BookmarkType["COLLECTION"] = 0] = "COLLECTION";
  BookmarkType[BookmarkType["CURATION"] = 1] = "CURATION";
})(BookmarkType || (BookmarkType = {}));
export let ShareBoxPosition;
(function (ShareBoxPosition) {
  ShareBoxPosition[ShareBoxPosition["top"] = 0] = "top";
  ShareBoxPosition[ShareBoxPosition["bottom"] = 1] = "bottom";
})(ShareBoxPosition || (ShareBoxPosition = {}));
export let SortType;
(function (SortType) {
  SortType["cell"] = "cell";
  SortType["list"] = "list";
})(SortType || (SortType = {}));
export let SortBy;
(function (SortBy) {
  SortBy["normal"] = "normal";
  SortBy["date"] = "date";
  SortBy["collectionName"] = "collectionName";
  SortBy["type"] = "type";
  SortBy["chain"] = "chain";
})(SortBy || (SortBy = {}));
export const DEFAULT_COLLECTIONS = [CollectionType.ALL, CollectionType.CREATED, CollectionType.OWNED];
export let IpfsGateway;
(function (IpfsGateway) {
  IpfsGateway[IpfsGateway["NFTStorage"] = 0] = "NFTStorage";
  IpfsGateway[IpfsGateway["Web3Storage"] = 1] = "Web3Storage";
})(IpfsGateway || (IpfsGateway = {}));