import{b as ee,c as te,d as ie,e as ne}from"./chunk-3RXIF7TZ.js";import{c as Z}from"./chunk-YU4RSKM2.js";import"./chunk-WL5LMZZA.js";import{ca as Y,n as W,z as X}from"./chunk-2UZANWCT.js";import"./chunk-2JONWNYA.js";import"./chunk-FVG4OCAJ.js";import"./chunk-MX3BGMF7.js";import"./chunk-B47LJMRU.js";import"./chunk-YLQ2GSBQ.js";import"./chunk-EHV5JSNA.js";import"./chunk-PB7QIE4O.js";import"./chunk-S2V6IA2C.js";import"./chunk-2UBKXA5Q.js";import"./chunk-SPDRGHFO.js";import"./chunk-ZBEJAM5I.js";import"./chunk-N2PQ6HLD.js";import"./chunk-RYOTKPRJ.js";import"./chunk-ORQ34GH7.js";import"./chunk-DZT3OJCU.js";import"./chunk-7SMWJ3GR.js";import"./chunk-P2NRYBYH.js";import"./chunk-XXO64O37.js";import"./chunk-M7AISLOK.js";import"./chunk-URVBFPQY.js";import"./chunk-OP2OM2NB.js";import"./chunk-YFKO2YMD.js";import{a as Q}from"./chunk-KMX5PVQZ.js";import"./chunk-H7ZIYAN2.js";import"./chunk-D5M6Y5VI.js";import{c as G}from"./chunk-PFQHIQUX.js";import{a as R,c as q,d as U,h as z}from"./chunk-3CODJNWE.js";import{z as D}from"./chunk-HJB5ICMZ.js";import"./chunk-QU4JA34D.js";import"./chunk-TAYSHZWB.js";import"./chunk-GDIYNKGM.js";import{b as $}from"./chunk-L4FY67IO.js";import"./chunk-7WODUV7D.js";import{g as K}from"./chunk-WWV256XH.js";import"./chunk-EP2DJHVF.js";import"./chunk-S3JIFK7T.js";import"./chunk-EQ67X7AF.js";import{a as J}from"./chunk-LMRN7T6T.js";import"./chunk-IVW2C32D.js";import{c as A,f as H}from"./chunk-KANMOB5U.js";import"./chunk-D3YCQTGW.js";import"./chunk-OBT56KUD.js";import{m as O}from"./chunk-NMCXU7N6.js";import{$b as M,Ba as k,Bc as l,Dc as L,Jc as j,Ma as C,Na as y,Nb as V,Rb as v,Uc as d,Vc as h,Yb as B,_b as x,ac as b,bc as o,cc as n,g as w,ha as _,hc as E,mc as I,oc as F,p as P,sb as c,tb as u,u as g,v as T}from"./chunk-IYD54RT7.js";import"./chunk-RVFOIZLJ.js";function re(t,i){if(t&1){let p=E();o(0,"osee-connection-dropdown",6),I("connectionChange",function(r){C(p);let a=F();return y(a.selectConnection(r))}),n()}t&2&&v("connection",i)("showNoneOption",!0)}function ae(t,i){if(t&1&&(o(0,"a",8),d(1,"async"),l(2),n()),t&2){let p=i.$implicit,e=F(2);v("routerLink",(h(1,2,e.basePath)||"")+p.path),c(2),L(" ",p.name," ")}}function pe(t,i){if(t&1&&(o(0,"mat-expansion-panel")(1,"mat-expansion-panel-header")(2,"mat-panel-title",7),l(3),n()(),M(4,ae,3,4,"a",8,x),n()),t&2){let p=i.$implicit;c(3),L(" ",p.name," "),c(),b(p.paths)}}var ce=(()=>{let i=class i{constructor(e,r,a,s){this.uiService=e,this.structureService=r,this.route=a,this.loadingService=s,this._filter=new w(""),this.connection=new w(W),this.names=this.connection.pipe(_(f=>this.structureService.getStructureNames(f.id||"-1").pipe(_(m=>this._filter.pipe(g(S=>S!==""?m.filter(N=>N.name.toLowerCase().includes(S)||N.paths.map(oe=>oe.name.toLowerCase()).flat().includes(S)):m)))))),this.basePath=T([this.uiService.id,this.uiService.type]).pipe(_(([f,m])=>P(`../../../connections/${m}/${f}`))),this.loading=this.loadingService.isLoading}ngOnInit(){this.route.paramMap.pipe(g(e=>{this.uiService.typeValue=e.get("branchType")||"",this.uiService.idValue=e.get("branchId")||""})).subscribe()}selectConnection(e){this.connection.next(e)}applyFilter(e){this._filter.next(e.target.value.toLowerCase())}};i.\u0275fac=function(r){return new(r||i)(u(K),u(X),u(A),u(J))},i.\u0275cmp=k({type:i,selectors:[["osee-messaging-structure-names"]],standalone:!0,features:[j],decls:17,vars:8,consts:[["input",""],[3,"connection","showNoneOption"],[1,"tw-w-full","tw-pb-4"],["matInput","","type","search",3,"keyup","disabled"],["matPrefix",""],["multi","true","displayMode","flat"],[3,"connectionChange","connection","showNoneOption"],[1,"tw-line-clamp-1","tw-whitespace-nowrap"],["mat-button","","queryParamsHandling","merge",3,"routerLink"]],template:function(r,a){if(r&1){let s=E();o(0,"osee-messaging-controls"),V(1,re,1,2,"osee-connection-dropdown",1),d(2,"async"),n(),o(3,"mat-form-field",2)(4,"mat-label"),l(5,"Filter Structures"),n(),o(6,"input",3,0),d(8,"async"),I("keyup",function(m){return C(s),y(a.applyFilter(m))}),n(),o(9,"mat-icon",4),l(10,"filter_list"),n(),o(11,"mat-hint"),l(12,"Enter text to filter structures."),n()(),o(13,"mat-accordion",5),M(14,pe,6,1,"mat-expansion-panel",null,x),d(16,"async"),n()}if(r&2){let s;c(),B(1,(s=h(2,2,a.connection))?1:-1,s),c(5),v("disabled",h(8,4,a.loading)==="true"),c(8),b(h(16,6,a.names))}},dependencies:[H,O,D,z,R,G,Q,U,q,ne,ee,te,ie,$,Z,Y],styles:["[_nghost-%COMP%]{height:94vh;min-height:calc(94vh - 10%);max-height:94vh;width:100vw;min-width:calc(100vw - 10%);display:inline-block}"]});let t=i;return t})(),Ie=ce;export{ce as StructureNamesComponent,Ie as default};
