const apiSsrBaseURL = "http://localhost:8080/api/v1/_/bkdf_tibi_2024/"
const { frontendBase, tibiUrl } = require("./config-client")
module.exports = {
    operatorEmail: "info@binkrassdufass.de",
    operatorName: "BinKrassDuFass",
    contactEmail: "support@binkrassdufass.de",
    noReplyEmail: "noreply@binkrassdufass.de",
    frontendBase,
    apiBase: frontendBase + "/api/",
    tibiUrl,
    apiSsrBaseURL,
    ssrValidatePath: function (/** @type {string} */ path) {
        // validate if path ssr rendering is ok, -1 = NOTFOUND, 0 = NO SSR, 1 = SSR
        // pe. use context.readCollection("product", {filter: {path: path}}) ... to validate dynamic urls

        // // / is de home
        // if (path == "/") return 1

        // // all other sites are in db
        //path = path?.replace(/^\//, "")
        if (path.includes("profile") || path.includes("@") || path.includes("redirectToProfile")) return 0
        const resp = context.db.find("content", {
            filter: {
                $and: [{ $or: [{ path }, { "alternativePaths.path": path }] }],
            },

            selector: { _id: 1 },
        })
        if (resp && resp.length) {
            return 1
        }

        // not found
        return -1
    },
    ssrPublishCheckCollections: ["content"],
    LIGHTHOUSE_TOKEN: "AIzaSyC0UxHp3-MpJiDL3ws7pEV6lj57bfIc7GQ",
    bigcommerceApiOAuth: "92tgx3by44vmizj6gu1ev4jjdjqu2rb",
    serverBaseURL: "https://www.binkrassdufass.de/api/", // "https://bkdf-tibi-2024-tibiserver.code.testversion.online/api/v1/_/bkdf_tibi_2024/", // LIVE:
    bigcommerceStoreHash: "punbvyqteo",
    channelId: 1578456,
    channelName: "BinKrassDuFass",
    logoPath: "_/assets/logo/logo-white.svg",
    jwtSecret: "7456ztjihugf@@ofg#iehuifdnfgobvcxsdafa+rpeertuhbfgnvcxfasdijnfvdssecretodhxfgoidfsjgpias",
    masterPassword: "ycxfvöklpcxylkäpöcdsyüäp#öldsa#öpü+äAds#+äüööü+ä#pcxdsäö.#cvx.vl,bcxlvöä,cbkmköldfgoplü+fsda",
    DeepLkey: "1a248829-fcd8-40e2-8437-c3fa1d2a416e",
    jwtValidityDuration: 600,
    bigCommerceCliendId: "3zx5dwd9n9h7w72d2yg8845g2b28m5x",
    bigCommerceClientSecret: "444dc8e9ce6fea29110cff1238a952f4b807655c1b1175cbbea8bd039e236e7d",
    omnisendApiKey: "6682ded7516e60cf4800023f-HHGGCOm2tCuPdb81NLo3K018AjqekWL3gFGWlNWae08NbJbdk2",
    bigcommerceBaseURL: "https://store-punbvyqteo.mybigcommerce.com",
    fb_accessToken:
        "EAA2c78abUOoBOxX9IPbHZBSJ6rZA0tqpv6jkZCCRzZA6OvIHkTbl9h02MwoBKu8ZAqFGfYFSOXV0nBwNJ9f6319PyGdtfUrfpECZCdQj1a6cAJJaKxcguSDNVMYr5aSQ1UlovOGaaQeMzwVUW1LKzx3KFq1m7Vwl30xTMjQTaQSYVk9zIoTlySqv2pFZBZAuCasPsAZDZD",
    printfulAPIToken: "dtHTQ8JMe4eeBklIIfcZf2YHtq3NgKhwmhIC7FND",
}
