import { jsx as _jsx } from "@emotion/react/jsx-runtime";
import { registerComponent } from "../interfaces";
import MenuTabComponent from "../components/MenuTab";
import iconsList from "../components/iconsList";
import { ComponentPropertyEditorContainer } from "../components/ComponentPropertyEditorContainer";
const MenuTab = registerComponent("Menu Tab", {
    type: "none",
    icon: "Container",
    group: "layout",
    kind: "container",
    experimental: true,
    hidden: true,
    defaultProps: {
        title: "Menu Tab",
        showLeadingIcon: false,
        leadingIcon: "Tabs",
    },
    propDefinition: {
        title: { group: "Design", type: "expression", options: {} },
        showLeadingIcon: {
            group: "Design",
            type: "boolean",
            options: { format: "boolean" },
        },
        leadingIcon: {
            group: "Design",
            type: "string",
            options: {
                format: "icon",
                options: [
                    ...Object.keys(iconsList).map((item) => ({
                        label: item,
                        value: item,
                    })),
                ],
            },
            style: {
                width: "full-width",
            },
        },
    },
    Editor: {
        leadingIcon: (props) => {
            var _a;
            if (!((_a = props.values) === null || _a === void 0 ? void 0 : _a.showLeadingIcon))
                return null;
            return (_jsx(ComponentPropertyEditorContainer, Object.assign({ title: "Leading Icon" }, { children: _jsx(props.PropertyEditor.string, { onChange: props.onChange, propDef: props.propDef, propName: props.propName, value: props.value }) })));
        },
    },
    Component: (props) => _jsx(MenuTabComponent, Object.assign({}, props)),
});
export default MenuTab;
//# sourceMappingURL=buildMenuTab.js.map