// move to @subscan/widget-runtime in the future?
var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
import { Type } from '@sinclair/typebox';
export function StringUnion(values, options) {
    return Type.KeyOf(Type.Object(values.reduce(function (prev, cur) {
        prev[cur] = Type.Boolean();
        return prev;
    }, {})), options);
}
export var FALLBACK_METADATA = {
    name: '',
    description: '',
    displayName: '',
    exampleProperties: {},
};
export var getComponentProps = function (props) {
    var 
    /* eslint-disable @typescript-eslint/no-unused-vars */
    component = props.component, slotsElements = props.slotsElements, childrenMap = props.childrenMap, services = props.services, app = props.app, customStyle = props.customStyle, callbackMap = props.callbackMap, mergeState = props.mergeState, subscribeMethods = props.subscribeMethods, getElement = props.getElement, elementRef = props.elementRef, hooks = props.hooks, isInModule = props.isInModule, isInEditor = props.isInEditor, componentDidMount = props.componentDidMount, componentDidUnmount = props.componentDidUnmount, componentDidUpdate = props.componentDidUpdate, 
    /* eslint-enable @typescript-eslint/no-unused-vars */
    rest = __rest(props, ["component", "slotsElements", "childrenMap", "services", "app", "customStyle", "callbackMap", "mergeState", "subscribeMethods", "getElement", "elementRef", "hooks", "isInModule", "isInEditor", "componentDidMount", "componentDidUnmount", "componentDidUpdate"]);
    return rest;
};
