import{k as y,l as j,v as S,w as q,y as L}from"./chunk-N7QGVGEJ.js";import{Aa as m,Ba as c,Ca as w,Df as Q,Ja as O,La as u,Lb as W,Na as f,P as _,Qa as k,R as a,Ra as M,S as s,Sa as P,Yc as A,Z as x,Zg as K,_ as I,ad as D,ae as H,ca as d,ea as B,ed as G,hb as z,hd as N,ja as R,na as T,ob as V,pb as v,sa as C,ua as b,za as p,zc as h}from"./chunk-KXULQLCW.js";import{h as E,i as F}from"./chunk-66YHNWRR.js";var J=i=>[i];function X(i,n){if(i&1&&w(0,"perfion-element-resizer",1),i&2){let l=f();p("resizableElement",l.hostElementRef.nativeElement)("defaultWidthValue","360px")}}function Y(i,n){if(i&1){let l=O();m(0,"perfion-view-option-component",9),u("selectedViewOptionChange",function(o){a(l);let e=f();return s(e.viewOptionChanged(o))}),c()}if(i&2){let l=f();p("options",l.viewButtons)("selectedViewOption",l.config.viewOption)}}var de=(()=>{let n=class n extends L{constructor(){super(...arguments),this.viewOptionService=_(j),this.hostElementRef=_(I),this.showViewOption=!0,this.showResizer=!0,this.confirmSelectionWithEnter=new B}set layout(t){t!=null&&(this.showViewOption=!1,this.config.viewOption=t)}set itemBrandToShow(t){if(t==null)return;this.dataExchange=new H;let o={[h.Normal]:"Normal",[h.Virtual]:"Virtual",[h.CatalogRoot]:"CatalogRoot"},e=t.map(r=>o[r]);this.dataExchange.clauses.push(new Q("Brand",D.IN,e))}ngOnInit(){return F(this,null,function*(){E(n.prototype,this,"ngOnInit").call(this),this.selectableBaseFeatureId=this.feature.baseFeatureID?this.feature.baseFeatureID:this.feature.id,this.config.mode=N.Selectable,this.config.showUntagged=!1,this.config.focusFilterOnInit=!0,this.config.viewOption=this.viewOptionService.getViewOption(this.selectableBaseFeatureId,y.Selectors)??G.Card})}collapseAll(){this.simpleGrid.collapseAll()}expandAll(){this.simpleGrid.expandAll()}viewOptionChanged(t){this.config.viewOption=t,this.viewOptionService.setViewOption(this.selectableBaseFeatureId,t,y.Selectors)}};n.\u0275fac=(()=>{let t;return function(e){return(t||(t=x(n)))(e||n)}})(),n.\u0275cmp=R({type:n,selectors:[["perfion-simple-selectable"]],viewQuery:function(o,e){if(o&1&&k(S,5),o&2){let r;M(r=P())&&(e.simpleGrid=r.first)}},inputs:{keyPressedValue:"keyPressedValue",layout:"layout",itemBrandToShow:"itemBrandToShow",inContextOfFeature:"inContextOfFeature",customRowFiltering:"customRowFiltering",showResizer:"showResizer"},outputs:{confirmSelectionWithEnter:"confirmSelectionWithEnter"},features:[T],decls:12,vars:22,consts:[["simpleGrid",""],["elementLocalStorageKey","dialog-simple-selectable-sidebar",3,"resizableElement","defaultWidthValue"],[1,"toolbar"],[1,"toolbar__controls"],["type","button",1,"toolbar__button","toolbar__button--icon",3,"click","disabled","title"],["src","assets/icons/toolbar_expand.svg"],["src","assets/icons/toolbar_collapse.svg"],[3,"options","selectedViewOption"],[1,"flex-row","card-view",3,"rowSelected","confirmSelectionWithEnter","baseFeatureIds","inContextOfFeature","dataExchange","config","contextItemId","keyPressedValue","allowEdit","headerBackgroundColor","customRowFiltering","enableKeyboardNavigation"],[3,"selectedViewOptionChange","options","selectedViewOption"]],template:function(o,e){if(o&1){let r=O();C(0,X,1,2,"perfion-element-resizer",1),m(1,"div",2)(2,"div",3)(3,"button",4),V(4,"translate"),u("click",function(){return a(r),s(e.expandAll())}),w(5,"img",5),c(),m(6,"button",4),V(7,"translate"),u("click",function(){return a(r),s(e.collapseAll())}),w(8,"img",6),c(),C(9,Y,1,2,"perfion-view-option-component",7),c()(),m(10,"perfion-simple-wrapper",8,0),u("rowSelected",function(U){return a(r),s(e.selectRow(U))})("confirmSelectionWithEnter",function(){return a(r),s(e.confirmSelectionWithEnter.emit())}),c()}o&2&&(b(e.showResizer?0:-1),d(3),p("disabled",!(e.baseFeature!=null&&e.baseFeature.allowHierarchy)&&!e.feature.allowHierarchy)("title",v(4,16,"grid.expandAllRows")),d(3),p("disabled",!(e.baseFeature!=null&&e.baseFeature.allowHierarchy)&&!e.feature.allowHierarchy)("title",v(7,18,"grid.collapseAllRows")),d(3),b(e.showViewOption?9:-1),d(),p("baseFeatureIds",z(20,J,e.selectableBaseFeatureId))("inContextOfFeature",e.inContextOfFeature)("dataExchange",e.dataExchange)("config",e.config)("contextItemId",e.contextItemId)("keyPressedValue",e.keyPressedValue)("allowEdit",e.allowEdit)("headerBackgroundColor",e.headerBackgroundColor)("customRowFiltering",e.customRowFiltering)("enableKeyboardNavigation",!0))},dependencies:[W,S,q,K,A],styles:["[_nghost-%COMP%]{min-width:100%;max-width:100%;display:flex;flex-direction:column;flex:1}.card-layout-label[_ngcontent-%COMP%]{padding:4px}","@media screen and (max-width: 998px){.inner-addon[_ngcontent-%COMP%]{position:relative;margin-top:10px;margin-bottom:10px}.inner-addon[_ngcontent-%COMP%]   .glyphicon[_ngcontent-%COMP%]{position:absolute;padding-top:5px;cursor:pointer;z-index:2;left:24%}.inner-addon[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{padding-right:30px}}"]});let i=n;return i})();export{de as a};
