import AssetsList from "@/components/AssetsList";
import { useResource } from "@/modules/resource";
import { defineComponent, onMounted } from "vue";
import Header from "./components/Header";

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

    onMounted(() => {
      resource.controls.promotionListCtrl.loadPage(1);
    });

    return () => {
      return (
        <div>
          <Header />
          <AssetsList
            gap="25px"
            class="my-30px"
            columns={4}
            control={resource.controls.promotionListCtrl}
            item={(record: any) => (
              <resource.components.PromotionItem record={record} />
            )}
          />
        </div>
      );
    };
  },
});
