/*
 * @Author: sjl
 * @Date: 2023-04-08 11:51:02
 * @Descripttion: 
 */
import { DataTypeEnum } from './config';
// import { StructJSON } from '/@/api/device/model/modelOfMatterModel';
// import { FormField } from '/@/views/device/profiles/step/cpns/physical/cpns/config';

export enum OpenModalMode {
  CREATE = 'create',
  UPDATE = 'update',
}

export interface OpenModalParams {
  mode: OpenModalMode;
  record?: StructRecord;
}

export interface StructFormValue
  extends Partial<Record<Exclude<FormField, FormField.VALUE_RANGE | FormField.STRUCT>, string>> {
  [FormField.TYPE]: DataTypeEnum;
  [FormField.VALUE_RANGE]?: {
    [FormField.MIN]: string;
    [FormField.MAX]: string;
  };
  [FormField.STRUCT]: StructRecord[];
}

export interface StructRecord extends StructJSON {
  id: string;
}
