
// @ts-nocheck
import React from 'react';
import Base from '../base/base';

import LookupValuesModal from './components/lookup-values-modal/lookup-values-modal';

class LookupValuesAPI extends Base {

    constructor() {
        super();

        this.fields = [
            {
                field: 'name',
                caption: 'Name',
            },

            {
                field: 'description',
                caption: 'Description',
            },

            {
                field: 'value',
                caption: 'Value',
            },
        ];
    }

    get getEndpoint() {
        return 'lookupvalue';
    }

    get path() {
        return `lookupvalue`;
    }

    get getName() {
        return this.modelName + `s`;
    }

    get modelName() {
        return `lookupvalue`;
    }

    get route() {
        return 'lookupvalue';
    }

    /**
     *
     */
    get columns() {
        return [
            {
                caption: 'Type',
                field: 'type',
                key: 'type',
            },

            {
                caption: 'Description',
                field: 'description',
                key: 'description',
            },

            {
                caption: 'Mode',
                field: 'mode',
                key: 'mode',
            },

            {
                caption: 'Created By',
                field: 'created_by',
                key: 'created_by',
            },

            {
                caption: 'Created at',
                field: 'created_at',
                key: 'created_at',
            },
        ];
    }

    ModalAddComponent = (props) => <LookupValuesModal model={this} {...props} />;

}

export default LookupValuesAPI;
