import { jsx as _jsx } from "@emotion/react/jsx-runtime";
import { createComponent } from '@meta-ui/core';
import { Type } from '@sinclair/typebox';
import { Tooltip } from '@chakra-ui/react';
import { TextPropertySchema } from '../_internal/Text';
import Slot from '../_internal/Slot';
import { ColorSchemePropertySchema } from './Types/ColorScheme';
const TooltipImpl = ({ text, shouldWrapChildren, placement = 'auto', isOpen, hasArrow, isDisabled, defaultIsOpen, slotsMap, }) => {
    return (_jsx(Tooltip, Object.assign({ label: text, placement: placement, isOpen: isOpen, hasArrow: hasArrow, isDisabled: isDisabled, defaultIsOpen: defaultIsOpen, shouldWrapChildren: shouldWrapChildren }, { children: _jsx(Slot, { slotsMap: slotsMap, slot: "content" }, void 0) }), void 0));
};
const PropsSchema = Type.Object({
    text: TextPropertySchema,
    colorScheme: ColorSchemePropertySchema,
    shouldWrapChildren: Type.Boolean(),
    defaultIsOpen: Type.Boolean(),
    hasArrow: Type.Boolean(),
    isDisabled: Type.Boolean(),
    isOpen: Type.Boolean(),
    placement: Type.Optional(Type.KeyOf(Type.Object({
        top: Type.String(),
        right: Type.String(),
        bottom: Type.String(),
        left: Type.String(),
        auto: Type.String(),
        'auto-start': Type.String(),
        'auto-end': Type.String(),
        'top-start': Type.String(),
        'top-end': Type.String(),
        'bottom-start': Type.String(),
        'bottom-end': Type.String(),
        'right-start': Type.String(),
        'right-end': Type.String(),
        'left-start': Type.String(),
        'left-end': Type.String(),
    }))),
});
export default Object.assign(Object.assign({}, createComponent({
    version: 'chakra_ui/v1',
    metadata: {
        name: 'tooltip',
        description: 'chakra-ui tooltip',
        displayName: 'Tooltip',
        isDraggable: false,
        isResizable: false,
        exampleProperties: {
            text: 'tooltip',
        },
        exampleSize: [2, 1],
    },
    spec: {
        properties: PropsSchema,
        state: {},
        methods: [],
        slots: ['content'],
        styleSlots: [],
        events: [],
    },
})), { impl: TooltipImpl });
//# sourceMappingURL=Tooltip.js.map