import i18n from "@/i18n/config";
import { PanelConfig } from "@/page/App/components/InspectPanel/interface";
import { VALIDATION_TYPES } from "@/utils/validationFactory";

const baseWidgetName = "card";
export const CARD_PANEL_CONFIG: PanelConfig[] = [
  {
    id: `${baseWidgetName}-basic`,
    groupName: i18n.t("editor.inspect.setter_group.basic"),
    children: [
      {
        id: `${baseWidgetName}-card-label`,
        labelName: "Card Name",
        attrName: "cardName",
        setterType: "INPUT_SETTER",
        expectedType: VALIDATION_TYPES.STRING,
        defaultValue:"Your Card"
      },
      {
        id: `${baseWidgetName}-card-caption`,
        labelName: "Card Caption",
        attrName: "cardCaption",
        setterType: "INPUT_SETTER",
        expectedType: VALIDATION_TYPES.STRING,
        defaultValue:"Current Value"
      },//imageWidth,cardHeight
      {
        id: `${baseWidgetName}-card-value`,
        labelName: "Card Value",
        attrName: "cardValue",
        setterType: "INPUT_SETTER",
        expectedType: VALIDATION_TYPES.STRING,
        defaultValue:"$ 4689"
      },
      {
        id: `${baseWidgetName}-label-cardImage`,
        labelName: "Card Image",
        attrName: "cardImage",
        setterType: "INPUT_SETTER",
        expectedType: VALIDATION_TYPES.STRING,
      },
      {
        id: `${baseWidgetName}-label-ImageWidth`,
        labelName: "Image Width",
        attrName: "imageWidth",
        setterType: "INPUT_SETTER",
        expectedType: VALIDATION_TYPES.NUMBER,
      },
      {
        id: `${baseWidgetName}-label-cardHeight`,
        labelName: "Card Height",
        attrName: "cardHeight",
        setterType: "INPUT_SETTER",
        expectedType: VALIDATION_TYPES.NUMBER,
      },
    ],
  },
  {
    id: `${baseWidgetName}-style`,
    groupName: i18n.t("editor.inspect.setter_group.style"),
    children: [
      {
        id: `${baseWidgetName}-validation-classesCondition`,
        labelName: "Style Class Condition",
        labelDesc: i18n.t("editor.inspect.setter_tooltip.form_data_key"),
        setterType: "INPUT_SETTER",
        expectedType: VALIDATION_TYPES.BOOLEAN,
        defaultValue: true,
        attrName: "isClassTrue",
      },
      {
        id: `${baseWidgetName}-style-classes`,
        labelName: "Select True CSS Classes  :",
        isSetterSingleRow: true,
        attrName: "trueClasses",
        setterType: "BASE_MULTI_SELECT_SETTER",
        expectedType: VALIDATION_TYPES.ARRAY,
      },
      {
        id: `${baseWidgetName}-style-classes`,
        labelName: "Select false CSS Classes  :",
        isSetterSingleRow: true,
        attrName: "falseClasses",
        setterType: "BASE_MULTI_SELECT_SETTER",
        expectedType: VALIDATION_TYPES.ARRAY,
      },
    ],
  },
];
