(()=>{"use strict";var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var l in o)e.o(o,l)&&!e.o(t,l)&&Object.defineProperty(t,l,{enumerable:!0,get:o[l]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.wp.apiFetch;var o=e.n(t);jQuery(function(){const e=elementor.modules.controls.Select2.extend({onReady:function(){this.controlSelect=this.$el.find(".custom-control-select"),this.savedValue=this.$el.find(".saved-value").val(),o()({path:"/formgent/admin/forms/select"}).then(e=>{let t=e.forms.map(e=>({text:e.label,id:e.value,selected:this.savedValue===e.value}));t.unshift({text:"-- Select a Form --",id:"0",selected:!0}),this.controlSelect.select2({data:t})}).catch(e=>{console.error("Failed to fetch forms:",e)})},onBeforeDestroy:function(){this.controlSelect.select2("close")}});elementor.addControlView("formgent-select",e)})})();