import { MatDialog } from "@angular/material/dialog";
import { openObjectEditDialog, ParseSchema } from "./func-parse";


    const _Role:ParseSchema = {
        "title":"用户组",
        "className": "_Role",
        emptyImg:"/img/group-empty.png",
        "fieldsArray": [
            {
                "key":"title",
                "name":"用户组名称",
                "type": "String",
                isHeader:true
            },
            {
                "key":"name",
                "name":"用户组标识",
                "type": "String",
                isHeader:true
            },
            {
                "key":"desc",
                "name":"描述",
                "type": "String"
            },
        ],
        buttons:[
            {
                name:"编辑",
                place:"item",
                show:(options:{object:Parse.Object})=>{
                    return true
                },
                handle:(options:{dialog:MatDialog,object:Parse.Object})=>{
                    openObjectEditDialog(options?.dialog,_Role,options?.object)
                }
            },
        ]
      };
      
      export default _Role;