"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ScreenMedia = void 0;
var react_1 = __importDefault(require("react"));
var ScreenMedia_style_1 = __importDefault(require("./ScreenMedia.style"));
var ScreenMedia = function (_a) {
    var showIn = _a.showIn, maxWidth = _a.maxWidth, maxHeight = _a.maxHeight, minWidth = _a.minWidth, minHeight = _a.minHeight, children = _a.children;
    var medias = [];
    if (maxWidth)
        medias.push("(max-width: " + maxWidth + "px)");
    if (minWidth)
        medias.push("(min-width: " + minWidth + "px)");
    if (maxHeight)
        medias.push("(max-height: " + maxHeight + "px)");
    if (minHeight)
        medias.push("(min-height: " + minHeight + "px)");
    switch (showIn) {
        case 'mobile':
            medias = ["(min-width: 1000px)"];
            break;
        case 'desktop':
            medias = ["(max-width: 1000px)"];
            break;
    }
    var hideIn = "@media " + medias.join(' and ');
    return (react_1.default.createElement(ScreenMedia_style_1.default, { hideIn: hideIn },
        react_1.default.createElement("span", { className: "size-screen" }, children)));
};
exports.ScreenMedia = ScreenMedia;
//# sourceMappingURL=ScreenMedia.js.map