(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d21eef9"],{d84c:function(e,t,a){"use strict";a.r(t),a.d(t,"default",(function(){return d}));var n=a("c621"),c=a("3af9"),r=a("d5fa"),o=a("7ee8"),l=a("bc9b"),s=a("7a23");const i=Object.assign(Object.assign({},c["Rb"]),{pointerEvents:"all"});var d=Object(s["defineComponent"])({name:"DesignerCardCascader",mixins:[c["u"]],props:Object.assign({},c["v"]),setup(e){Object(s["onBeforeMount"])(()=>{var t;const a=e.currentInstance;if(!a)return;const r=c["R"].fetchOptions(a);r.normalMaskStyle=i;let o=null===(t=c["R"].fetchAreaInstanceNullable(e.currentInstance,c["A"].ROW_ACTIONS))||void 0===t?void 0:t.element;o||(o=c["wb"].createAreaWidgetInstance(a,c["A"].ROW_ACTIONS,{element:{title:Object(n["translateValueByKey"])(c["cb"])}}),c["R"].add(a,o));const l=c["R"].fetchOptions(o);l.draggableItemComponentData=Object.assign(Object.assign({},r.draggableItemComponentData||{}),{style:{position:"relative"}})});const t=Object(s["computed"])(()=>c["R"].fetchAreaInstanceNullable(e.currentInstance,c["A"].CONTENT)),a=Object(s["computed"])(()=>c["R"].fetchAreaInstanceNullable(e.currentInstance,c["A"].ROW_ACTIONS)),r=Object(s["computed"])(()=>{var t;const a=null===(t=e.currentInstance)||void 0===t?void 0:t.element.properties.nodes;let c=!1;if(null===a||void 0===a?void 0:a.length){const e=[];if(a.forEach(t=>{var a,r,l;const s=null===(a=t.modelDefinition)||void 0===a?void 0:a.model;if(s){const a=Object(n["uniqueKeyGenerator"])(),i={key:a,model:s},d=null===(r=t.selfReferencesFieldDefinition)||void 0===r?void 0:r.field;d&&(i.selfReferences={model:(null===(l=t.selfReferencesFieldDefinition)||void 0===l?void 0:l.model)||s,fieldName:d}),t.title&&(c=!0),e.push({key:a,title:n["CastHelper"].cast(()=>{const{title:e}=t;if(c||!Object(o["a"])(e))return e||""}),value:i,children:[{key:Object(n["uniqueKeyGenerator"])(),title:t.modelDefinition.displayName||Object(n["translateValueByKey"])("未命名模型"),value:{},children:[],isLeaf:!0}],isLeaf:!0})}}),e.length)return e}return[{key:Object(n["uniqueKeyGenerator"])(),title:Object(n["translateValueByKey"])("未配置"),value:{},children:[],isLeaf:!0}]}),l=Object(s["computed"])(()=>n["Optional"].ofNullable(e.currentInstance).map(e=>c["R"].fetchProperties(e)).map(e=>e.enableSearch).map(e=>n["BooleanHelper"].toBoolean(e)).orElse(!1)),d=Object(s["computed"])(()=>n["Optional"].ofNullable(e.currentInstance).map(e=>c["R"].fetchProperties(e)).map(e=>e.selectable).map(e=>n["BooleanHelper"].toBoolean(e)).orElse(!1)),u=Object(s["computed"])(()=>!(!d.value||!t.value));return Object(s["watch"])(()=>d.value,()=>{var e;const a=null===(e=t.value)||void 0===e?void 0:e.element;a&&(a.element.isVirtual=!d.value)},{immediate:!0}),{content:t,rowActions:a,rootNodes:r,enableSearch:l,selectable:d,hasSelectContent:u}},render(){const{currentInstance:e,widgetCategoryGroup:t,widgetNameGroup:a,widgetTypeGroup:o,content:i,rowActions:d,rootNodes:u,hasSelectContent:p}=this;if(!e)return[];const b=[],O=u.length-1;u.forEach((e,i)=>{var u;const p=!!e.value.selfReferences,f=O===i,{title:m}=e;let v;v=Object(l["a"])(m)?null===(u=n["CastHelper"].cast(m))||void 0===u?void 0:u():m,b.push(Object(s["createVNode"])(n["OioCard"],{key:e.key,class:p?"designer-card-cascader-card-tree":"designer-card-cascader-card-list",title:v},{default:()=>{const l=Object(s["createVNode"])(r["OioTree"],{data:e.children});let i;if(i=this.enableSearch?[Object(s["createVNode"])("div",{class:"designer-search-tree-wrapper"},[Object(s["createVNode"])(r["OioInputSearch"],{placeholder:Object(n["translateValueByKey"])("请输入关键字")}),l])]:[l],f&&d){const{element:e,index:n}=d;i.push(Object(s["createVNode"])("div",{class:"designer-card-cascader-row-actions-wrapper"},[Object(s["createVNode"])(c["w"],{key:e.id,currentInstance:e,currentIndex:n,widgetCategoryGroup:t,widgetNameGroup:a,widgetTypeGroup:o})]))}return i}}))});const f=Object(s["createVNode"])(n["OioCardCascader"],{class:"designer-card-cascader",style:Object(c["kc"])(e)},{default:()=>b}),m=[f];if(p&&i){const{element:e,index:n}=i;m.push(Object(s["createVNode"])("div",{class:"designer-card-cascader-content"},[Object(s["createVNode"])(c["w"],{key:e.id,currentInstance:e,currentIndex:n,widgetCategoryGroup:t,widgetNameGroup:a,widgetTypeGroup:o})]))}return Object(s["createVNode"])("div",{class:"designer-card-cascader-wrapper"},m)}});d.__file="src/view/component/designer-draggable/component/element/card-cascader/DesignerCardCascader.vue"}}]);