import { type_manager } from "./functions.js"; class order { #shop; #link; constructor(link) { if (!type_manager.is_string(link)) { throw "Link to the order must be an string."; } this.#link = link.trim(); const link_without_protocol = link.split("//").pop(); const parts = link_without_protocol.split("/"); const name = parts.shift(); const subdomains = name.split("."); if (subdomains[0].search("www") !== -1) { subdomains.shift(); } this.#shop = subdomains.join("."); } get shop() { return this.#shop; } get link() { return this.#link; } } export { order };