/*! For license information please see jfb-action.js.LICENSE.txt */
(()=>{"use strict";var e={426:(e,t,o)=>{var n=o(196),r=Symbol.for("react.element"),i=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function a(e,t,o){var n,a={},c=null,_=null;for(n in void 0!==o&&(c=""+o),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(_=t.ref),t)i.call(t,n)&&!l.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===a[n]&&(a[n]=t[n]);return{$$typeof:r,type:e,key:c,ref:_,props:a,_owner:s.current}}t.jsx=a,t.jsxs=a},246:(e,t,o)=>{e.exports=o(426)},196:e=>{e.exports=window.React}},t={};function o(n){var r=t[n];if(void 0!==r)return r.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}(()=>{var e=o(246);const{TextControl:t,SelectControl:n}=wp.components,{useState:r,useEffect:i,Fragment:s}=wp.element,{withRequestFields:l,withLoadingSelect:a}=JetFBHooks,{withSelect:c,withDispatch:_}=wp.data,{compose:p}=wp.compose,{addAction:d,getFormFieldsBlocks:u,Tools:{withPlaceholder:f}}=JetFBActions;d("connect_relation_items",p(c(l))((function({settings:t,label:o,help:l,source:a,onChangeSettingObj:c,requestFields:_}){const[p,d]=r([]);return i((()=>{d([...u([],"--"),..._])}),[]),(0,e.jsxs)(s,{children:[(0,e.jsx)(n,{label:o("relation"),labelPosition:"side",value:t.relation,onChange:e=>c({relation:e}),options:f(a.relations)}),(0,e.jsx)(n,{label:o("parent_id"),labelPosition:"side",value:t.parent_id,onChange:e=>c({parent_id:e}),options:p}),(0,e.jsx)(n,{label:o("child_id"),labelPosition:"side",value:t.child_id,onChange:e=>c({child_id:e}),options:p}),(0,e.jsx)(n,{label:o("context"),labelPosition:"side",value:t.context,onChange:e=>c({context:e}),options:f(a.context_options)}),(0,e.jsx)(n,{label:o("store_items_type"),labelPosition:"side",value:t.store_items_type,onChange:e=>c({store_items_type:e}),options:f(a.store_items_type_options)})]})})));const{addFilter:h}=wp.hooks;h("jet.fb.preset.editor.custom.condition","jet-form-builder",(function(e,t,o){return"relation_query_var"===t?"connect_relation_items"===o.from&&["query_var","object_var"].includes(o.rel_object_from):e}))})()})();
//# sourceMappingURL=jfb-action.js.map