"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cssForPhone = exports.cssForPhablet = exports.cssForTablet = exports.getEnvironment = exports.phone = exports.phablet = exports.tablet = exports.desktop = void 0;
exports.desktop = 1240;
exports.tablet = 1024;
exports.phablet = 600;
exports.phone = 400;
const getEnvironment = () => {
    if (globalThis.deesDomTools &&
        globalThis.deesDomTools.domToolsStatePart.getState().virtualViewport) {
        return globalThis.deesDomTools.domToolsStatePart.getState().virtualViewport;
    }
    else {
        return 'native';
    }
};
exports.getEnvironment = getEnvironment;
const cssForTablet = (contentArg) => {
    if ((0, exports.getEnvironment)() === 'native' || (0, exports.getEnvironment)() === 'desktop') {
        return `
      @media (max-width: ${exports.tablet}px) {
        ${contentArg}
      }
    `;
    }
    else if ((0, exports.getEnvironment)() === 'tablet' ||
        (0, exports.getEnvironment)() === 'phablet' ||
        (0, exports.getEnvironment)() === 'phone') {
        return `
      @media (min-width: 0px) {
        ${contentArg}
      }
    `;
    }
};
exports.cssForTablet = cssForTablet;
const cssForPhablet = (contentArg) => {
    if ((0, exports.getEnvironment)() === 'native' || (0, exports.getEnvironment)() === 'desktop') {
        return `
      @media (max-width: ${exports.phablet}px) {
        ${contentArg}
      }
    `;
    }
    else if ((0, exports.getEnvironment)() === 'phablet' || (0, exports.getEnvironment)() === 'phone') {
        return `
      @media (min-width: 0px) {
        ${contentArg}
      }
    `;
    }
};
exports.cssForPhablet = cssForPhablet;
const cssForPhone = (contentArg) => {
    if ((0, exports.getEnvironment)() === 'native' || (0, exports.getEnvironment)() === 'desktop') {
        return `
      @media (max-width: ${exports.phone}px) {
        ${contentArg}
      }
    `;
    }
    else if ((0, exports.getEnvironment)() === 'phone') {
        return `
      @media (min-width: 0px) {
        ${contentArg}
      }
    `;
    }
};
exports.cssForPhone = cssForPhone;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9tdG9vbHMuYnJlYWtwb2ludHMuanMiLCJzb3VyY2VSb290IjoiI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