"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(t,e){var r,i=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,r)),i}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:String(e)}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.setFieldNames=exports.getDefaultFieldNames=exports.fieldNamesProps=exports.default=void 0;var getDefaultFieldNames=exports.getDefaultFieldNames=function(){return{label:"label",value:"value",children:"children",disabled:"disabled"}},fieldNamesProps=exports.fieldNamesProps={defaultFieldNames:{type:Object,value:getDefaultFieldNames()}},setFieldNames=exports.setFieldNames=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return _objectSpread(_objectSpread({},getDefaultFieldNames()),e)},_default=exports.default=Behavior({properties:_objectSpread({},fieldNamesProps),data:{useFieldNames:!1,fieldNames:getDefaultFieldNames()},definitionFilter:function(e){Object.assign(e.data=e.data||{},{fieldNames:getDefaultFieldNames()}),Object.assign(e.methods=e.methods||{},{getFieldNames:function(){var e=this.data;return e.useFieldNames?e.fieldNames:e.defaultFieldNames},getFieldName:function(e){return this.getFieldNames()[e]}})},lifetimes:{attached:function(){var e=this.data;this.setData({useFieldNames:!0,fieldNames:setFieldNames(e.defaultFieldNames)})}}});