export default {
    A: [
        {
            name: 'address',
            label_key: 'content',
        },
    ],
    AAAA: [
        {
            name: 'address',
            label_key: 'content',
        },
    ],
    CNAME: [
        {
            name: 'target',
            label_key: 'content',
        },
    ],
    TXT: [
        {
            name: 'strings',
            // нарезаем на строки длиной 255 для совместимости со стандартом
            toServerFormat: x => x ? x.match(/.{1,255}/g) : [],
            toClientString: x => x ? x.join('') : '',
            label_key: 'content',
        },
    ],
    NS: [
        {
            name: 'target',
            label_key: 'content',
        },
    ],
    MX: [
        {
            name: 'exchange',
            label_key: 'content',
        },
        {
            name: 'preference',
            type: 'number',
            label_key: 'priority',
        },
    ],
    SRV: [
        {
            name: 'target',
            label_key: 'content',
        },
        {
            name: 'priority',
            type: 'number',
        },
        {
            name: 'weight',
            type: 'number',
        },
        {
            name: 'port',
            type: 'number',
        },
    ],
    SOA: [
        {
            name: 'refresh',
            type: 'number',
            label_content: 'REFRESH',
        },
        {
            name: 'retry',
            type: 'number',
            label_content: 'RETRY',
        },
        {
            name: 'expire',
            type: 'number',
            label_content: 'EXPIRE',
        },
        {
            name: 'minimum',
            type: 'number',
            label_content: 'MINIMUM',
        },
        {
            name: 'rname',
            label_content: 'RNAME',
        },
    ],
};
