"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TypeTheme = void 0;
var tslib_1 = require("tslib");
var react_1 = tslib_1.__importDefault(require("react"));
var v_eris_1 = require("v-eris");
require("./types.theme.scss");
var TypeTheme = function (props) {
    var params = props.params, value = props.value, stack = props.stack, k = props.k, permissions = props.permissions, lang = props.lang, rest = tslib_1.__rest(props, ["params", "value", "stack", "k", "permissions", "lang"]);
    if (!params)
        params = [];
    var selected = params.find(function (f) { return f.value == value; });
    if (!selected)
        selected = "white";
    else
        selected = selected.value;
    return react_1.default.createElement("div", { className: "theme" }, params.map(function (v, index) {
        return (react_1.default.createElement("div", { key: v.value, className: v_eris_1.Props.className("theme-item", { selected: v.value == selected }), "data-theme": v.value },
            react_1.default.createElement(v_eris_1.Card, null,
                react_1.default.createElement(v_eris_1.Row, null,
                    react_1.default.createElement(v_eris_1.Toggle, null),
                    react_1.default.createElement(v_eris_1.Space, null),
                    lang.get("General::Theme::CurrentTheme")),
                react_1.default.createElement(v_eris_1.Row, null,
                    react_1.default.createElement(v_eris_1.Input, null, "search")),
                react_1.default.createElement("div", { className: "theme-title" }, lang.get(v.title))),
            react_1.default.createElement("div", { className: "theme-bg", onClick: function () { return props.onChange({ value: v.value }); } })));
    }));
};
exports.TypeTheme = TypeTheme;
//# sourceMappingURL=types.theme.js.map