// import { PADDING_MODE } from "@illa-public/public-types"
import { v4 } from "uuid"
import { ReactComponent as ContainerWidgetIcon} from "@/assets/widgetCover/container.svg"
import { PADDING_MODE } from "@/utils/generators/interface"
import { BasicContainerConfig } from "@/widgetLibrary/BasicContainer/BasicContainer"
import { RESIZE_DIRECTION, WidgetConfig } from "@/widgetLibrary/interface"

const defaultListView = [
  { id: v4(), key: "View 1", label: "View 1" },
  { id: v4(), key: "View 2", label: "View 2" },
  { id: v4(), key: "View 3", label: "View 3" },
]

export const CONTAINER_WIDGET_CONFIG: WidgetConfig = {
  type: "CONTAINER_WIDGET",
  displayName: "container",
  widgetName: "Container",
  keywords: ["container", "容器"],
  icon: <ContainerWidgetIcon />,
  sessionType: "CONTAINER",
  w: 12,
  h: 19,
  version: 0,
  childrenNode: [
    BasicContainerConfig,
    BasicContainerConfig,
    BasicContainerConfig
  ],
  defaults: {
    viewList: defaultListView,
    currentIndex: 0,
    currentKey: "View 1",
    backgroundColor: "#ffffffff",
    radius: "4px",
    shadow: "small",
    dynamicHeight: "auto",
    resizeDirection: RESIZE_DIRECTION.ALL,
    padding: {
      mode: PADDING_MODE.ALL,
      size: "0",
    },
  },
}
