require(['config'], function() {
	require([
		'jquery'
	], function($) {

	});
});

function itp_fn_BIZPOP_DEVICE_DTL_SET(parentPopFn, args, returnType) {
	
	let setCd = itp_fn_get_param_value(args, 'setCd'); 
	let setNm = itp_fn_get_param_value(args, 'setNm');
	
	$('#ITP_FORM_BIZPOP_DEVICE_DTL_SET_SET_CD').val(setCd);
	$('#ITP_BIZPOP_DEVICE_DTL_SET .fnSetNm').text(decodeURI(setNm));
	
	$('#ITP_BIZPOP_DEVICE_DTL_SET_BTN_APPLY').on('click', function() {	
		
		let result = $('#ITP_FORM_BIZPOP_DEVICE_DTL_SET_COM_PORT').val() + '^';
		result += $('#ITP_FORM_BIZPOP_DEVICE_DTL_SET_BAUD_RATE').val() + '^';
		result += $('#ITP_FORM_BIZPOP_DEVICE_DTL_SET_DATA_BITS').val() + '^';
		result += $('#ITP_FORM_BIZPOP_DEVICE_DTL_SET_PARITY').val() + '^';
		result += $('#ITP_FORM_BIZPOP_DEVICE_DTL_STOP_BITS').val() + '^';
		result += $('#ITP_FORM_BIZPOP_DEVICE_DTL_FLOW_CONTROL').val();
		
		parentPopFn(result);
		$('#ITP_BIZPOP_DEVICE_DTL_SET').modal('hide'); // 팝업닫기
	});	
	
	$('#ITP_BIZPOP_DEVICE_DTL_SET').one('shown.bs.modal', function(e) {		
		itp_fn_fire_window_resize();
	}).one('hidden.bs.modal', function(e) {
		$('#ITP_BIZPOP_DEVICE_DTL_SET').remove();
	}).modal('show');
	
};

