import { DropDownListModel } from '@ibiz-template/model';
import {
  DropDownListEditorController,
  FormItemController,
  GridEditItemController,
  IEditorProvider,
} from '@ibiz-template/controller';
/**
 * 多选框列表编辑器适配器
 *
 * @author lxm
 * @date 2022-09-19 22:09:03
 * @export
 * @class DropDownListEditorProvider
 * @implements {EditorProvider}
 */
export class DropDownListEditorProvider implements IEditorProvider {
  formEditor: string = 'IBizDropdown';

  gridEditor: string = 'IBizGridDropdown';

  async createController(
    editorModel: DropDownListModel,
    parentController: FormItemController | GridEditItemController,
  ): Promise<DropDownListEditorController> {
    const c = new DropDownListEditorController(editorModel, parentController);
    await c.init();
    return c;
  }
}
