/********************************************************
 --------------------------------------------------------
 - Object 목록								            -
 --------------------------------------------------------
 * const gridColModel = {}	: 화면 Grid Object			*
 * let pageObj = {}			: 화면공통 Object			*
 * let listObj = {}			: 목록화면 Object			*
 * let viewObj = {}			: 상세화면 Object			*
 * let modifyObj = {}		: 수정화면 Object			*
 * let createObj = {}		: 신규화면 Object			*
 *******************************************************/

/*화면 변수*/
const TEMPLATE_GRID_ID = '#ITP_TEMPLATE_jqGrid';
const TEMPLATE_GRID_LIST = '#ITP_TEMPLATE_jqGrid_list';
const TEMPLATE_GRID_PAGER = '#ITP_TEMPLATE_jqGridPager';
const TEMPLATE_GRID_EMPTY = '#ITP_TEMPLATE_jqGridEmpty';

const TEMPLATE_VIEW_GRID_ID = '#ITP_TEMPLATE_VIEW_jqGrid';
const TEMPLATE_VIEW_GRID_LIST = '#ITP_TEMPLATE_VIEW_jqGrid_list';
const TEMPLATE_VIEW_GRID_PAGER = '#ITP_TEMPLATE_VIEW_jqGridPager';
const TEMPLATE_VIEW_GRID_EMPTY = '#ITP_TEMPLATE_VIEW_jqGridEmpty';

const TEMPLATE_DETAIL_GRID_ID = '#ITP_TEMPLATE_DETAIL_jqGrid';
const TEMPLATE_DETAIL_GRID_LIST = '#ITP_TEMPLATE_DETAIL_jqGrid_list';
const TEMPLATE_DETAIL_GRID_PAGER = '#ITP_TEMPLATE_DETAIL_jqGridPager';
const TEMPLATE_DETAIL_GRID_EMPTY = '#ITP_TEMPLATE_DETAIL_jqGridEmpty';

/*API URL*/

/*화면 Grid Object*/
const gridColModel = {
    list: [],
    view: [],
    detail: []
};

require(['config'], function() {
    require([
    ], function($) {
        pageObj.init();
    });
});

/*화면공통 Object*/
let pageObj = {
    init: function () {
        this.ui.init();
        this.event.init();
    },
    ui: {
        init: function () {
        }
    },
    event: {
        init: function () {
            this.button();
        },
        button: function () {
            // 버튼 클릭 이벤트
        }
    },
    switchScreen: function(mode) {
        if (mode == 'LIST') { // 목록
        } else if(mode == 'ADD') { // 등록
        } else if(mode == 'MODIFY') { // 수정
        } else if(mode == 'VIEW') { // 보기
        }
    }
};

/*목록화면 Object*/
let listObj = {
    init: function () {
        this.grid.init();
    },
    empty: {
    },
    grid: {
        init: function () {
        },
        colModel: gridColModel.list,
        search: function() {
        },
        load: function() {
        },
        reload : function() {
        },
        clearData : function() {
        },
        unload : function() {
        }
    }
};

/*상세화면 Object*/
let viewObj = {
    init: function (param) {
        this.load(param);
    },
    load: function() {
    },
    callback: function (result) {
        // console.log(result);
    }
};

/*수정화면 Object*/
let modifyObj = {
    init: function (param) {
        this.load(param);
    },
    load: function() {
    },
    callback: function (result) {
        // console.log(result);
    }
};

/*신규화면 Object*/
let createObj = {
    init: function () {
        this.load();
    },
    load: function () {
    }
};