import { isFireFox } from "./compatibility";
var jsonProxyUrl = process.env.PROXY1;
var jsonProxyUrl2 = process.env.PROXY2;
var imageProxyStart = 'https://ik.imagekit.io/p/';
var imageProxyEnd = '?tr=n-card';
export var jsonProxy = function jsonProxy(url) {
  return "".concat(jsonProxyUrl).concat(encodeURIComponent(url));
};
export var jsonProxy2 = function jsonProxy2(url) {
  return "".concat(jsonProxyUrl2).concat(encodeURIComponent(url));
};
export var imageProxy = function imageProxy(url) {
  return "".concat(imageProxyStart).concat(encodeURIComponent(url)).concat(imageProxyEnd);
};
export var avatarProxy = function avatarProxy(address) {
  return "https://context.app/api/avatar/".concat(address, "?size=40");
};
export var revokeJsonProxy = function revokeJsonProxy(url) {
  return decodeURIComponent(url.replaceAll(jsonProxyUrl, '').replaceAll(encodeURIComponent(jsonProxyUrl), ''));
};
export var revokeJsonProxy2 = function revokeJsonProxy2(url) {
  return decodeURIComponent(url.replaceAll(jsonProxyUrl2, '').replaceAll(encodeURIComponent(jsonProxyUrl2), ''));
};
export var revokeImageProxy = function revokeImageProxy(url) {
  return decodeURIComponent(url.replaceAll(imageProxyStart, '').replaceAll(imageProxyEnd, ''));
};
var version = '0.5.11';
if (isFireFox()) {
  version = '0.4.8';
}
export var LATEST_VERSION = version;
export var defaultplatform = 'Marketplace';
export var defaultplatformInExplore = 'Marketplace';
export var 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 var 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 var 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 var 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 var EventType;
(function (EventType) {
  EventType["mint"] = "minted";
  EventType["bid"] = "bid";
  EventType["buy"] = "purchased";
  EventType["sale"] = "sold";
  EventType["transfer"] = "transferred";
})(EventType || (EventType = {}));
export var typeArray = ['NFT', 'Mirror', 'Video', 'File', 'Website', 'Folder'];
export var BookmarkType;
(function (BookmarkType) {
  BookmarkType[BookmarkType["COLLECTION"] = 0] = "COLLECTION";
  BookmarkType[BookmarkType["CURATION"] = 1] = "CURATION";
})(BookmarkType || (BookmarkType = {}));
export var ShareBoxPosition;
(function (ShareBoxPosition) {
  ShareBoxPosition[ShareBoxPosition["top"] = 0] = "top";
  ShareBoxPosition[ShareBoxPosition["bottom"] = 1] = "bottom";
})(ShareBoxPosition || (ShareBoxPosition = {}));
export var SortType;
(function (SortType) {
  SortType["cell"] = "cell";
  SortType["list"] = "list";
})(SortType || (SortType = {}));
export var SortBy;
(function (SortBy) {
  SortBy["normal"] = "normal";
  SortBy["date"] = "date";
  SortBy["collectionName"] = "collectionName";
  SortBy["type"] = "type";
  SortBy["chain"] = "chain";
})(SortBy || (SortBy = {}));
export var DEFAULT_COLLECTIONS = [CollectionType.ALL, CollectionType.CREATED, CollectionType.OWNED];
export var IpfsGateway;
(function (IpfsGateway) {
  IpfsGateway[IpfsGateway["NFTStorage"] = 0] = "NFTStorage";
  IpfsGateway[IpfsGateway["Web3Storage"] = 1] = "Web3Storage";
})(IpfsGateway || (IpfsGateway = {}));