import { StateRoot } from "queenjs";
import ListModule from ".";
import { ColDataType, DialogItem } from "./objects/item";

export const stores = ListModule.store({
  state: () => ({
    baseURL: "",
    list: [],
    // items: [] as any,
    dialogs: [] as DialogItem[],
    parentWidth: 0,
    parentHeight: 0,
    animate: {
      scrollType: "vertical", // 滚动方式 vertical horizontal
      totalLines: 8, //行数或列数
      padding: 12, //间距
      scrollSpeed: 1,
    },
    canvas: {
      linesData: [] as ColDataType[],
      linesCount: 0,
      width: 0,
      height: 0,
      scale: 1,
      padding: 12,
      itemOffset: 0,
    },
  }),
  getters: {},
});

export default class extends StateRoot {}
