import { __rest } from "tslib";
import React from "react";
import { Card, Props, Row, Space, Toggle, Input } from "v-eris";
import "./types.theme.scss";
export var TypeTheme = function (props) {
    var params = props.params, value = props.value, stack = props.stack, k = props.k, permissions = props.permissions, lang = props.lang, rest = __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.createElement("div", { className: "theme" }, params.map(function (v, index) {
        return (React.createElement("div", { key: v.value, className: Props.className("theme-item", { selected: v.value == selected }), "data-theme": v.value },
            React.createElement(Card, null,
                React.createElement(Row, null,
                    React.createElement(Toggle, null),
                    React.createElement(Space, null),
                    lang.get("General::Theme::CurrentTheme")),
                React.createElement(Row, null,
                    React.createElement(Input, null, "search")),
                React.createElement("div", { className: "theme-title" }, lang.get(v.title))),
            React.createElement("div", { className: "theme-bg", onClick: function () { return props.onChange({ value: v.value }); } })));
    }));
};
//# sourceMappingURL=types.theme.js.map