import { defineComponent } from "vue";
import { View } from "../basicUI/View";

export const createUIComp: typeof defineComponent = function (options: any) {
  const { setup } = options;

  options.setup = function (props: any, options: any) {
    const render = setup(props, options);
    return () => <View compId={props.compId}>{render()}</View>;
  };

  return defineComponent(options);
} as any;
