import { createAttrsForm } from "../../../defines/createAttrsForm";
import { createCompHooks } from "../../../defines/createCompHooks";
import { createCompId } from "../../../defines/createCompId";

export { Component } from "./component";

export const options = {
  name: "封面",
  thumbnail: require("@/assets/comps/cover/1.png"),
};

export const { createComp, useCompData } = createCompHooks({
  layout: {
    size: [750, 1300],
  },
  value: {},
  children: {
    bg: () =>
      createCompId("Image", {
        value: {
          url: "https://infishwaibao.oss-cn-chengdu.aliyuncs.com/release/sku3d/img/partner_bg.5e324d05.png",
        },
        layout: {
          size: [750, 1300],
        },
      }),
    title: () =>
      createCompId("Text", {
        value: `<p style="text-align:center;"><span style="color:hsl(0,0%,100%);font-size:28px;">新科技反光面料</span></p><p style="text-align:center;"><span style="color:hsl(0,0%,100%);font-size:28px;">引领潮流新风尚</span></p><p style="text-align:center;">&nbsp;</p><p style="text-align:center;"><span style="color:hsl(0,0%,100%);font-size:16px;">时尚 ｜ 精致 ｜ 百搭</span></p>`,
        layout: {
          size: [750, 200],
        },
      }),
  },
});

export const Form = createAttrsForm([]);
