import { BasicColumn } from '/@/components/Table';
import { FormSchema } from '/@/components/Table';
import { h } from 'vue';
import { Tag } from 'ant-design-vue';
import { Icon } from '/@/components/Icon';
import { useI18n } from '/@/hooks/web/useI18n';
const { t } = useI18n();

//二维图层管理表格列
export const columns = [
    {
        title: '底图名称',
        dataIndex: 'name',
    },
    {
        title: '底图标识',
        dataIndex: 'id',
    },
    {
        title: '底图类型',
        dataIndex: 'type',
    },
    {
        title: '坐标编码',
        dataIndex: 'epsg',
    },
    {
        title: '底图地址',
        dataIndex: 'url',
    },
    {
        title: '显示隐藏',
        dataIndex: 'show',
        slots: { customRender: 'show' },
    },
    // {
    //     title: '层级范围',
    //     dataIndex: 'level',
    //     slots: { customRender: 'level' },
    // }

    // {
    //     title: '审核状态',
    //     dataIndex: 'status',
    //     width: 110,
    //     slots: { customRender: 'status' },
    //   },
];


//----------------------------------新增、编辑----------------------------------------------------------
export const formSchema: FormSchema[] = [
    {
        field: 'name',
        label: '底图名称',
        component: 'Input',
        required: true,
        componentProps: {
            maxLength: 255,
        },
    },
    {
        field: 'id',
        label: '底图标识',
        component: 'Input',
        required: true,
        componentProps: {
            maxLength: 255,
        },
    },
    {
        field: 'index',
        label: '图层层级',
        component: 'Input',
        componentProps: {
            maxLength: 255,
        },
    },
    {
        field: 'show',
        label: '显示隐藏',
        component: 'RadioButtonGroup',
        defaultValue: true,
        componentProps: {
            options: [
                { label: '显示', value: true },
                { label: '隐藏', value: false },
            ],
        },
    },
    {
        field: 'type',
        label: '底图类型',
        required: true,
        component: 'Select',
        defaultValue: 'S3M',
        componentProps: {
            options: [
                { label: '超图模型', value: 'S3M' },
                { label: '通用倾斜', value: '3DTITLE' },
            ],
        },
        colProps: { span: 6 },
    },
    {
        field: 'subdomains',
        label: '地图子域',
        component: 'Input',
        componentProps: {
            maxLength: 255,
        },
    },
    {
        field: 'url',
        label: '底图地址',
        component: 'InputTextArea',
        required: true,
        colProps: { span: 24 },
        componentProps: {
            rows: 8,
            maxLength: 255,
        },
    },
    {
        field: 'view',
        label: '观察视角',
        component: 'InputTextArea',
        colProps: { span: 24 },
        componentProps: {
            rows: 6,
            maxLength: 255,
        },
    },

];