1import{a as F,b as oe,c as se,e as ae}from"./chunk-XAM3QSCJ.js";import{a as S}from"./chunk-CHPIC22S.js";import{a as ne}from"./chunk-GIZCSYXI.js";import{a as y,c as re}from"./chunk-P5X6MD23.js";import{a as te,c as ie}from"./chunk-ECWU2D3W.js";import"./chunk-KGAMT5TP.js";import{F as ee,G as T}from"./chunk-VISYDWF4.js";import{A as z,B as O,Ba as n,G,Ha as J,Hb as M,Ja as K,Ka as Q,La as m,Lb as W,Ma as c,Mb as _,Na as r,Ua as g,Za as U,_b as B,ba as v,bc as X,c as I,dc as Y,ec as P,fb as N,gb as k,ia as D,jc as C,kc as Z,la as s,mb as d,nb as V,ob as h,pa as l,pb as H,rb as o,sb as a,ta as u,tb as $,ua as q,wb as w,ya as f}from"./chunk-KJZGBUCZ.js";import"./chunk-FK6H3RFT.js";import"./chunk-EQDQRRRY.js";var xe=e=>["/units/unit",e];function Ie(e,i){if(e&1&&r(0,"img",6),e&2){let t=g();U("src","",t.apiUrl,"",t.unit.logo,"",D)}}function Oe(e,i){e&1&&r(0,"img",7)}function De(e,i){if(e&1&&(m(0,"h3"),N(1),o(2,"safeGet"),c()),e&2){let t=g();s(),k($(2,1,t.unit,"name_ar"))}}function Ue(e,i){if(e&1&&(m(0,"h3"),N(1),o(2,"safeGet"),c()),e&2){let t=g();s(),k($(2,1,t.unit,"name_en"))}}var j=class e{constructor(i,t,p){this.cdr=i;this.languageService=p;this.isBrowser=_(t)}unit={};isBrowser;langSubscription;lang="ar";direction="ltr";apiUrl=P.apiUrl;ngOnInit(){this.langSubscription=this.languageService.lang$.subscribe(i=>{this.lang=i}),this.isBrowser&&(this.detectDirection(),this.observeDirectionChange())}detectDirection(){if(!this.isBrowser)return;let i=document.documentElement.getAttribute("dir");this.direction=i==="rtl"?"rtl":"ltr",this.cdr.detectChanges()}observeDirectionChange(){if(!this.isBrowser)return;new MutationObserver(()=>{this.detectDirection()}).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]})}ngOnDestroy(){this.langSubscription.unsubscribe()}static \u0275fac=function(t){return new(t||e)(l(w),l(v),l(T))};static \u0275cmp=u({type:e,selectors:[["app-unit-card"]],inputs:{unit:"unit"},standalone:!1,decls:7,vars:7,consts:[[1,"service-card"],[3,"routerLink"],[1,"service-icon","electronic-coordination"],["alt","service icon",3,"src",4,"ngIf"],["src","Logo.png","alt","service icon",4,"ngIf"],[4,"ngIf"],["alt","service icon",3,"src"],["src","Logo.png","alt","service icon"]],template:function(t,p){t&1&&(m(0,"div",0)(1,"a",1)(2,"div",2),f(3,Ie,1,3,"img",3)(4,Oe,1,0,"img",4),c(),f(5,De,3,4,"h3",5)(6,Ue,3,4,"h3",5),c()()),t&2&&(s(),n("routerLink",d(5,xe,p.unit.id)),s(2),n("ngIf",p.unit.logo),s(),n("ngIf",!p.unit.logo),s(),n("ngIf",p.lang==="ar"),s(),n("ngIf",p.lang==="en"))},dependencies:[M,X,te],styles:[".container[_ngcontent-%COMP%]{padding-bottom:70px;margin-left:auto;margin-right:auto}*[_ngcontent-%COMP%]{margin:0;padding:0;box-sizing:border-box}.service-card[_ngcontent-%COMP%]{padding:25px;border-radius:10px;text-align:center;transition:transform .3s ease}a[_ngcontent-%COMP%]{text-decoration:none;color:#000}.service-icon[_ngcontent-%COMP%]{border-radius:50%;display:flex;align-items:center;justify-content:center;margin:0 auto 20px}.service-card[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:24;font-weight:800;margin-bottom:15px}.service-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{line-height:1.6;font-size:16px;font-weight:800}@media (max-width: 768px){.service-card[_ngcontent-%COMP%]{padding:0;margin-bottom:20px}h5[_ngcontent-%COMP%]{border-bottom:5px solid #ff6b00;padding-bottom:5px;padding-left:0}}.gradient-textTwo[_ngcontent-%COMP%]{background:linear-gradient(to right,#2a5eb2,#1e427e,#12284c);-webkit-background-clip:text;background-clip:text;color:transparent;font-weight:700}"]})};function Be(e,i){if(e&1&&r(0,"app-unit-card",1),e&2){let t=i.$implicit;n("unit",t)}}var b=class e{constructor(i,t,p){this.sectorsService=i;this.route=t;this.platformId=p;this.isBrowser=_(this.platformId)}sectorType="";destroy$=new I;lang="ar";params={};unitsList=[];isLoading=!1;isBrowser;ngOnInit(){this.isBrowser&&(this.params={page:1,page_size:9,sector_type:this.sectorType},this.loadUnits())}loadUnits(){this.isLoading=!0,this.sectorsService.getSector(this.params).pipe(O(this.destroy$)).subscribe({next:i=>{this.unitsList=i.results,this.isLoading=!1},error:i=>{this.handleError(i),this.isLoading=!1}})}handleError(i){console.error("API Error:",i)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}static \u0275fac=function(t){return new(t||e)(l(F),l(B),l(v))};static \u0275cmp=u({type:e,selectors:[["app-units-section"]],inputs:{sectorType:"sectorType"},standalone:!1,decls:3,vars:0,consts:[[1,"services-grid","container"],[3,"unit"]],template:function(t,p){t&1&&(m(0,"div",0),K(1,Be,1,1,"app-unit-card",1,J),
1c()),t&2&&(s(),Q(p.unitsList))},dependencies:[j],styles:[".container[_ngcontent-%COMP%]{padding-bottom:70px;margin-left:auto;margin-right:auto}*[_ngcontent-%COMP%]{margin:0;padding:0;box-sizing:border-box}.services-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:30px;margin-bottom:40px}@media (max-width: 768px){.services-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]})};var Pe=e=>({title:e,section:"units"}),Te=e=>({title:e,section:"centers"}),Fe=(e,i)=>[e,i],je=(e,i,t)=>({title:e,description:i,links:t}),A=class e{static \u0275fac=function(t){return new(t||e)};static \u0275cmp=u({type:e,selectors:[["app-units-and-centers"]],standalone:!1,decls:13,vars:28,consts:[[3,"headDetails"],["id","units"],[3,"title","description"],["sectorType","units"],["id","centers"],["sectorType","centers"]],template:function(t,p){t&1&&(r(0,"app-section-head",0),o(1,"translate"),o(2,"translate"),o(3,"translate"),o(4,"translate"),m(5,"section",1),r(6,"app-section-heading",2),o(7,"translate"),r(8,"app-units-section",3),c(),m(9,"section",4),r(10,"app-section-heading",2),o(11,"translate"),r(12,"app-units-section",5),c()),t&2&&(n("headDetails",h(24,je,a(1,5,"units_and_centers.title"),a(2,7,"units_and_centers.subtitle"),V(21,Fe,d(17,Pe,a(3,9,"units_and_centers.title")),d(19,Te,a(4,11,"units_and_centers.centers"))))),s(6),n("title",a(7,13,"units_and_centers.title"))("description",""),s(4),n("title",a(11,15,"units_and_centers.centers"))("description",""))},dependencies:[S,y,b,C],encapsulation:2})};var Le=e=>({title:e,section:"administration"}),Ae=e=>[e],Ee=(e,i,t)=>({title:e,description:i,links:t}),E=class e{static \u0275fac=function(t){return new(t||e)};static \u0275cmp=u({type:e,selectors:[["app-administrations"]],standalone:!1,decls:8,vars:19,consts:[[3,"headDetails"],["id","administration"],[3,"title","description"],["sectorType","administration"]],template:function(t,p){t&1&&(r(0,"app-section-head",0),o(1,"translate"),o(2,"translate"),o(3,"translate"),m(4,"section",1),r(5,"app-section-heading",2),o(6,"translate"),r(7,"app-units-section",3),c()),t&2&&(n("headDetails",h(15,Ee,a(1,3,"adminstrations.title"),a(2,5,"adminstrations.subtitle"),d(13,Ae,d(11,Le,a(3,7,"adminstrations.title"))))),s(5),n("title",a(6,9,"adminstrations.title"))("description",""))},dependencies:[S,y,b,C],encapsulation:2})};var ue=e=>({title:e,section:"head"}),ge=e=>({title:e,section:"structure"}),fe=e=>({title:e,section:"services"}),he=e=>({title:e,section:"news"}),ve=(e,i,t,p)=>[e,i,t,p],_e=(e,i,t)=>({title:e,description:i,links:t});function Re(e,i){if(e&1&&(r(0,"app-section-head",12),o(1,"translate"),o(2,"translate"),o(3,"translate"),o(4,"translate")),e&2){let t=g();n("headDetails",h(22,_e,t.sector.name_ar,t.sector.description_ar,H(17,ve,d(9,ue,a(1,1,"units_and_centers.manager")),d(11,ge,a(2,3,"shared.Administrative_Structure")),d(13,fe,a(3,5,"shared.services")),d(15,he,a(4,7,"shared.news_and_events")))))}}function Ne(e,i){if(e&1&&(r(0,"app-section-head",12),o(1,"translate"),o(2,"translate"),o(3,"translate"),o(4,"translate")),e&2){let t=g();n("headDetails",h(22,_e,t.sector.name_en,t.sector.description_en,H(17,ve,d(9,ue,a(1,1,"units_and_centers.manager")),d(11,ge,a(2,3,"shared.Administrative_Structure")),d(13,fe,a(3,5,"shared.services")),d(15,he,a(4,7,"shared.news_and_events")))))}}function ke(e,i){if(e&1&&r(0,"app-section-heading",13),e&2){let t=g();n("title",t.sector.head_sector_name_ar)("description",t.sector.head_sector_title_ar)}}function He(e,i){if(e&1&&r(0,"app-section-heading",13),e&2){let t=g();n("title",t.sector.head_sector_name_en)("description",t.sector.head_sector_title_en)}}function $e(e,i){e&1&&(m(0,"div",14),r(1,"img",15),c())}function ze(e,i){if(e&1&&(m(0,"div",14),r(1,"img",16),c()),e&2){let t=g();s(),U("src","",t.apiUrl,"",t.sector.structure_url,"",D)}}var R=class e{constructor(i,t,p,qe,Se){this.sectorService=i;this.languageService=t;this.cdr=p;this.route=qe;this.isBrowser=_(Se)}unitID="";destroy$=new I;langSubscription;lang="ar";sector={};params={page:1};headOfSector={};apiUrl=P.apiUrl;isBrowser;ngOnInit(){this.isBrowser&&this.route.params.pipe(O(this.destroy$),z(i=>(this.unitID=i.id,this.sectorService.getSectorByID(this.unitID)))).subscribe({next:i=>{this.sector=i,this.updateHeadOfSector()},error:i=>this.handleError(i)}),this.langSubscription=this.languageService.lang$.subscribe(i=>{this.lang=i,this.updateHeadOfSector()})}updateHeadOfSector(){this.sector&&(this.headOfSector={img:this.sector.image_url,messageTitle:this.lang==="ar"?this.sector.message_title_ar:this.sector.message_title_en,message:this.lang==="ar"?this.sector.message_ar:this.sector.message_en,wordTitle:this.lang==="ar"?this.sector.speech_title_ar:this.sector.speech_title_en,word:this.lang==="ar"?this.sector.speech_ar:this.sector.speech_en,national_id:this.sector.head?.national_id})}handleError(i){console.error("API Error:",i)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.langSubscription.unsubscribe()}static \u0275fac=function(t){return new(t||e)(l(F),l(T),l(w),l(B),l(v))};static \u0275cmp=u({type:e,selectors:[["app-unit"]],standalone:!1,decls:21,vars:24,consts:[[3,"headDetails",4,"ngIf"],["id","head"],[3,"title","description",4,"ngIf"],[3,"headOf
1Sector"],["id","structure"],[3,"title"],["class","image-tree",4,"ngIf"],["id","services"],[3,"title","description","sectorID"],["id","news"],[3,"title","description","moreButton","moreButtonLink"],[3,"sectorID"],[3,"headDetails"],[3,"title","description"],[1,"image-tree"],["src","images/imagetree.png","alt",""],["alt","",3,"src"]],template:function(t,p){t&1&&(f(0,Re,5,26,"app-section-head",0)(1,Ne,5,26,"app-section-head",0),m(2,"section",1),f(3,ke,1,2,"app-section-heading",2)(4,He,1,2,"app-section-heading",2),r(5,"app-head-of-sector",3),c(),m(6,"section",4),r(7,"app-section-heading",5),o(8,"translate"),f(9,$e,2,0,"div",6)(10,ze,2,3,"div",6),r(11,"br")(12,"br"),c(),m(13,"section",7),r(14,"app-services-section",8),o(15,"translate"),o(16,"translate"),c(),m(17,"section",9),r(18,"app-section-heading",10),o(19,"translate"),r(20,"app-news-section",11),c()),t&2&&(n("ngIf",p.lang==="ar"),s(),n("ngIf",p.lang==="en"),s(2),n("ngIf",p.lang==="ar"),s(),n("ngIf",p.lang==="en"),s(),n("headOfSector",p.headOfSector),s(2),n("title",a(8,16,"shared.Administrative_Structure")),s(2),n("ngIf",!p.sector.structure_url),s(),n("ngIf",p.sector.structure_url),s(4),n("title",a(15,18,"shared.services"))("description",a(16,20,"units_and_centers.services_discription"))("sectorID",p.sector.id),s(4),n("title",a(19,22,"shared.news_and_events"))("description","")("moreButton","shared.search")("moreButtonLink","/news/news-search"),s(2),n("sectorID",p.sector.id))},dependencies:[M,S,y,se,oe,ne,C],styles:[".image-tree[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:center;margin-top:20px}.image-tree[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:100%;height:auto;object-fit:contain}@media (max-width: 768px){.image-tree[_ngcontent-%COMP%]{padding:10px}.image-tree[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-height:300px}}"]})};var Ge=[{path:"",component:ie,children:[{path:"units-and-centers",component:A},{path:"administrations",component:E},{path:"unit/:id",component:R}]}],Ce=class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=q({type:e});static \u0275inj=G({imports:[W,Y.forChild(Ge),ee,Z,re,ae]})};export{Ce as UnitsModule};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.