import { jsx as _jsx } from "@emotion/react/jsx-runtime";
import { Type } from '@sinclair/typebox';
import { createComponent } from '@meta-ui/core';
import { Switch } from './component';
const Router = ({ slotsMap, switchPolicy, subscribeMethods, mergeState }) => {
    return (_jsx(Switch, { slotMap: slotsMap, switchPolicy: switchPolicy, subscribeMethods: subscribeMethods, mergeState: mergeState }, void 0));
};
export var RouteType;
(function (RouteType) {
    RouteType["REDIRECT"] = "REDIRECT";
    RouteType["ROUTE"] = "ROUTE";
})(RouteType || (RouteType = {}));
const SwitchPolicyPropertySchema = Type.Array(Type.Object({
    type: Type.Enum(RouteType),
    default: Type.Boolean(),
    path: Type.String(),
    slotId: Type.String(),
    href: Type.Optional(Type.String()),
    strict: Type.Optional(Type.Boolean()),
    exact: Type.Optional(Type.Boolean()),
    sensitive: Type.Optional(Type.Boolean()),
}));
const PropsSchema = Type.Object({
    switchPolicy: Type.Array(Type.Object({
        type: Type.Enum(RouteType),
        default: Type.Boolean(),
        path: Type.String(),
        slotId: Type.String(),
        href: Type.Optional(Type.String()),
        strict: Type.Optional(Type.Boolean()),
        exact: Type.Optional(Type.Boolean()),
        sensitive: Type.Optional(Type.Boolean()),
    })),
});
export default Object.assign(Object.assign({}, createComponent({
    version: 'core/v1',
    metadata: {
        name: 'router',
        displayName: 'Router',
        description: 'create a router-controlled component',
        isDraggable: true,
        isResizable: true,
        exampleProperties: {
            switchPolicy: [],
        },
        exampleSize: [6, 6],
    },
    spec: {
        properties: PropsSchema,
        state: {},
        methods: [],
        slots: [],
        styleSlots: [],
        events: [],
    },
})), { impl: Router });
//# sourceMappingURL=index.js.map