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


    const _User:ParseSchema = {
        "title":"注册帐号",
        "className": "_User",
        emptyImg:"/img/group-empty.png",
        "fieldsArray": [
            // {
            //     "key":"avatar",
            //     "name":"用户头像",
            //     "type": "String",
            //     isHeader:true
            // },
            {
                "key":"username",
                "name":"用户帐号",
                "type": "String",
                isDisabled:true,
                isHeader:true
            },
            {
                "key":"name",
                "name":"用户姓名",
                "type": "String",
                isHeader:true
            },
            {
                "key":"mobile",
                "name":"手机号",
                "type": "String",
                isHeader:true
            },
            {
                "key":"email",
                "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,_User,options?.object)
                }
            },
        ]
      };
      
      export default _User;