"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)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _computedBehavior=_interopRequireDefault(require("./mixins/computedBehavior")),_relationsBehavior=_interopRequireDefault(require("./mixins/relationsBehavior")),_safeSetDataBehavior=_interopRequireDefault(require("./mixins/safeSetDataBehavior")),_funcBehavior=_interopRequireDefault(require("./mixins/funcBehavior")),_warningUnChecked=require("./shared/warningUnChecked");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function ownKeys(r,e){var t,o=Object.keys(r);return Object.getOwnPropertySymbols&&(t=Object.getOwnPropertySymbols(r),e&&(t=t.filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})),o.push.apply(o,t)),o}function _objectSpread(r){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(t),!0).forEach(function(e){_defineProperty(r,e,t[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(t,e))})}return r}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:String(e)}function _toPrimitive(e,r){if("object"!=_typeof(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return("string"===r?String:Number)(e);t=t.call(e,r||"default");if("object"!=_typeof(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,r){var t;if(e)return"string"==typeof e?_arrayLikeToArray(e,r):"Map"===(t="Object"===(t=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}(0,_warningUnChecked.warningUnChecked)();var baseComponent=function(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return r.externalClasses=["wux-class-a","wux-class-b","wux-class-c","wux-class","wux-hover-class"].concat(_toConsumableArray(r.externalClasses=r.externalClasses||[])),r.behaviors=[_safeSetDataBehavior.default].concat(_toConsumableArray(r.behaviors=r.behaviors||[]),[_relationsBehavior.default,_computedBehavior.default]),r.useFunc&&(r.behaviors=[].concat(_toConsumableArray(r.behaviors),[_funcBehavior.default]),delete r.useFunc),r.useField&&(r.behaviors=[].concat(_toConsumableArray(r.behaviors),["wx://form-field"]),delete r.useField),r.useFieldButton&&(r.behaviors=[].concat(_toConsumableArray(r.behaviors),["wx://form-field-button"]),delete r.useFieldButton),r.useExport&&(r.behaviors=[].concat(_toConsumableArray(r.behaviors),["wx://component-export"]),r.methods=_objectSpread(_defineProperty({},"export",function(){return this}),r.methods),r.export=r.methods.expose||r.methods.export,delete r.useExport),r.options=_objectSpread({multipleSlots:!0,addGlobalClass:!0},r.options),r.properties&&Object.keys(r.properties).forEach(function(e){e=r.properties[e];Array.isArray(e.type)&&(e.optionalTypes=e.type)}),Component(r)},_default=exports.default=baseComponent;