import { useEditor } from "@/modules/editor";
import { useResource } from "@/modules/resource";
import { defineComponent } from "vue";
import PromotionUI from "./components";
import { createPromotinController } from "./controller";

export default defineComponent({
  setup() {
    const resource = useResource();
    const editor = useEditor();

    const ctrl = createPromotinController(resource, editor);

    return () => (
      <PromotionUI
        Controller={ctrl}
        slots={
          {
            // MaterialItem: ()=>{
            //   return <div>item</div>
            // }
          }
        }
      ></PromotionUI>
    );
  },
});
