Liferay.Loader.define("commerce-product-content-web@4.0.80/js/AutoField.es",["module","exports","require","./CategorySelector.es","./TagSelector.es","frontend-js-metal-web$metal-component","frontend-js-metal-web$metal-soy","./AutoField.soy"],(function(e,t,l){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.AutoField=void 0,l("./CategorySelector.es"),l("./TagSelector.es");var o=_interopRequireDefault(l("frontend-js-metal-web$metal-component")),r=_interopRequireDefault(l("frontend-js-metal-web$metal-soy")),u=_interopRequireDefault(l("./AutoField.soy"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const e={queryContains:!0,type:"assetTags"};class AutoField extends o.default{created(){this.on("rulesChanged",this.onRulesChanged_)}addRule_(){this.rules=this.rules.concat(e)}changeSelector_(e){const t=e.delegateTarget.dataset.itemIndex,l=this.rules;l[t]={queryAndOperator:"all",queryContains:!0,type:e.target.value},this.rules=l}deleteRule_(e){const t=e.delegateTarget.dataset.ruleId;this.rules=this.rules.filter(((e,l)=>l!==Number(t)))}onRulesChanged_(){this.queryLogicIndexes=Object.keys(this.rules).toString()}}t.AutoField=AutoField,AutoField.STATE={groupIds:{value:[]},queryLogicIndexes:{value:"0"},rules:{value:[e]}},r.default.register(AutoField,u.default);var s=AutoField;t.default=s}}));
//# sourceMappingURL=AutoField.es.js.map