import { getDynamicScript } from "../data/CommonCategoryScript";

export type CommonListPageItemType = 'image-large-2'|'image-large'|'article-common'
  |'article-common-2'|'article-character'|'article-character-2'
  |'simple-text'|'simple-text-2'|'image-small'|'image-small-2';

export const CommonListPageItemTypeOptions = [
  { value: 'image-large-2', label: '大图2列 (image-large-2)' },
  { value: 'image-large', label: '大图 (image-large)' },
  { value: 'image-small', label: '小图 (image-small)' },
  { value: 'image-small-2', label: '小图2列 (image-small-2)' },
  { value: 'article-common', label: '普通文章 (article-common)' },
  { value: 'article-common-2', label: '普通文章2列 (article-common-2)' },
  { value: 'article-character', label: '人物文章 (article-character)' },
  { value: 'article-character-2', label: '人物文章2列 (article-character-2)' },
  { value: 'simple-text', label: '简单文本 (simple-text)' },
  { value: 'simple-text-2', label: '简单文本2列 (simple-text-2)' },
];

export function doDynamicNavDetails(dynamic: string, content: any, parentData: any) {
  return getDynamicScript().execute(dynamic, {
    main: content,
    parentData,
  }) as any;
}