/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */

"use strict";(self.webpackChunk_nocobase_plugin_workflow=self.webpackChunk_nocobase_plugin_workflow||[]).push([["142"],{693:function(e,n,t){t.d(n,{QueryFieldset:function(){return d},QueryPresetFieldset:function(){return p}});var l=t(9155),o=t.n(l),a=t(2059),r=t(2235),c=t(8198),i=t(9785),s=t(9488),u=t(5329),m=t(6855);function f(){var e=(0,s.kj)(),n=a.Form.useWatch(["config","collection"]);return n?o().createElement(o().Fragment,null,o().createElement(m.F,{collection:n,required:!1}),o().createElement(a.Form.Item,{name:["config","params","sort"],label:e("Sort")},o().createElement(c.o5,{collection:n})),o().createElement(c.uc,{pageName:["config","params","page"],pageSizeName:["config","params","pageSize"]}),o().createElement(a.Form.Item,{name:["config","params","appends"],label:e("Preload associations"),extra:e("Please select the associated fields that need to be accessed in subsequent nodes. With more than two levels of to-many associations may cause performance issue, please use with caution.")},o().createElement(c.Kr,{collection:n}))):null}function d(){var e,n,t=(0,s.kj)(),c=(0,r.TA)(),m=a.Form.useFormInstance(),d=[{label:(e=(0,s.kj)())("Single record"),value:!1,tooltip:e("The result will be an object of the first matching record only, or null if no matched record.")},{label:e("Multiple records"),value:!0,tooltip:e("The result will be an array containing matched records, or an empty one if no matching records. This can be used to be processed in a loop node.")}];return(0,l.useEffect)(function(){void 0===m.getFieldValue(["config","multiple"])&&m.setFieldValue(["config","multiple"],!1)},[m]),o().createElement(o().Fragment,null,o().createElement(u.F,{disabled:!!(null==c||null==(n=c.config)?void 0:n.collection),onCollectionChanged:function(){m.setFieldValue(["config","params"],{})}}),o().createElement(a.Form.Item,{name:["config","multiple"],label:t("Result type")},o().createElement(i.$,{options:d})),o().createElement(f,null),o().createElement(a.Form.Item,{name:["config","failOnEmpty"],valuePropName:"checked"},o().createElement(a.Checkbox,null,t("Exit when query result is null"))))}function p(){return o().createElement(u.F,null)}}}]);