import{a as k}from"./chunk-D4RZOGGF.js";import{b as _,c as C,d as j}from"./chunk-YOJ4KGSB.js";import"./chunk-CO3X7TQN.js";import{a as w}from"./chunk-VSFNMVXJ.js";import"./chunk-WQ6DP4JQ.js";import{sb as h}from"./chunk-YSQLW2JA.js";import{Ud as u,Vd as y}from"./chunk-NVJ2ZZFT.js";import{Aa as m,Ng as b,Te as x,ab as p,bb as c,bh as g,dc as f,dd as v,ya as d}from"./chunk-SKPDQO4E.js";var z=`<div class="h-100">\r
	<side-navigation>\r
		<ng-template side-navigation-nav>\r
			<div class="row">\r
				<div class="col-xl-12">\r
					<label class="report-form-label">{{'ADAPTER.FILTER_MODEL' | translate}}</label>\r
					<div class="select">\r
						<select [(ngModel)]="selectionType" (ngModelChange)="onModelChanged($event)"\r
							class="form-select form-select-sm">\r
							<option *ngFor="let option of adapterTypes" [ngValue]="option.type">{{option.description |\r
								translate}}</option>\r
						</select>\r
					</div>\r
				</div>\r
			</div>\r
		</ng-template>\r
		<ng-template side-navigation-content>\r
			<!-- Listing area -->\r
			<div class="row" [@listAnimation]="adapters.length">\r
				<!-- List of adapters -->\r
				<div class="col-xl-12" *ngFor="let adapter of adapters">\r
					<armon-adapter-card [adapter]="adapter"></armon-adapter-card>\r
				</div>\r
			</div>\r
			<div class="row pt-5" *ngIf="adapters && adapters.length==0">\r
				<div class="col-12">\r
					<nz-empty [nzNotFoundContent]="contentTpl" [nzNotFoundImage]="'./assets/images/empty/empty_list.png'">\r
						<ng-template #contentTpl>\r
							<span>{{'ADAPTER.FILTER_NO_ITEMS'|translate}}</span>\r
						</ng-template>\r
					</nz-empty>\r
				</div>\r
			</div>\r
			<div class="row pb-3 pt-3">\r
				<div class="col-xl-12">\r
					<armon-pagination [paginationResponse]="paginationResponse" (pageChanged)="pageChanged($event)">\r
					</armon-pagination>\r
				</div>\r
			</div>\r
		</ng-template>\r
	</side-navigation>\r
</div>`;var A=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}.paginationArea{position:absolute;width:100%;bottom:0}
`;var R=`<div class="card mb-3">

	<div class="card-body">

		<!-- Name of adapter type -->
		<div class="card-title mb-2">
			<cds-icon shape="connect" size="lg" class="me-3"></cds-icon>{{adapter.typeName}}&nbsp;<span
				class="color-dark-blue-color">{{'#' + adapter.number}}</span>
		</div>

		<!-- Ip address of adapter -->
		<div class="d-flex" *ngIf="adapter.ip">
			<span class="text-md" *ngFor="let ipAddress of adapter.ipAddressList">{{ipAddress}}</span>
		</div>


		<div class="row py-3">
			<div class="col-lg-6 col-md-12 mb-2" *ngFor="let device of adapter.adaptedDevices">
				<div class="device">
					<div class="deviceTitle">
						<span class="deviceBrandName">{{device.brandName}}</span>
						<div class="deviceCount" *ngIf="device.count > 1">{{'x' + device.count}}
						</div>
					</div>
					<div class="deviceModel">{{device.model}}</div>
				</div>
			</div>
		</div>

	</div>
</div>`;var N=`.justify-content-center{-webkit-box-pack:center;-moz-box-pack:center;-webkit-flex-pack:center;-ms-flex-pack:center;-moz-justify-content:center;-webkit-justify-content:center;justify-content:center}.justify-content-flex-end{-webkit-box-pack:end;-moz-box-pack:end;-webkit-flex-pack:end;-ms-flex-pack:end;-moz-justify-content:flex-end;-webkit-justify-content:flex-end;justify-content:flex-end}.card-footer{padding:.28rem .7rem}.alert{font-size:.756rem}@media screen and (min-width: 992px){.modal-xxl{max-width:1640px}}@media screen and (min-width: 1200px){.modal-xxxl{max-width:1860px}}.modal-fs{max-width:none;position:absolute;margin:auto;inset:16px;height:100vh;display:flex}.btn-link{text-decoration:none}.btn-link:hover{text-decoration:underline}.invalid-feedback{margin-top:0!important;font-size:.672rem!important}.device{padding:12px;-webkit-border-radius:.56rem;-moz-border-radius:.56rem;border-radius:.56rem;border:rgb(235,235,235) solid 1px;min-height:80px}.device .deviceTitle{display:-webkit-box;display:-moz-box;display:-webkit-flexbox;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-box-orient:horizontal;-moz-box-orient:horizontal;-webkit-flex-direction:row;-moz-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-pack:justify;-moz-box-pack:justify;-webkit-flex-pack:justify;-ms-flex-pack:justify;-moz-justify-content:space-between;-webkit-justify-content:space-between;justify-content:space-between}.device .deviceTitle .deviceBrandName{font-size:.756rem}.device .deviceTitle .deviceCount{font-size:1.05rem;line-height:.8rem;color:#62a325;border:#62a325 solid 1px;-webkit-border-radius:.375rem;-moz-border-radius:.375rem;border-radius:.375rem;padding:3px}.device .deviceModel{font-size:.672rem}
`;var L=function(n,e,i,o){var a=arguments.length,t=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,i):o,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(n,e,i,o);else for(var s=n.length-1;s>=0;s--)(r=n[s])&&(t=(a<3?r(t):a>3?r(e,i,t):r(e,i))||t);return a>3&&t&&Object.defineProperty(e,i,t),t},l=class{adapter;constructor(){}ngOnInit(){}ngOnDestroy(){}static ctorParameters=()=>[];static propDecorators={adapter:[{type:m}]}};l=L([d({selector:"armon-adapter-card",template:R,standalone:!0,imports:[c,p],styles:[N]})],l);var S=function(n,e,i,o){var a=arguments.length,t=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,i):o,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(n,e,i,o);else for(var s=n.length-1;s>=0;s--)(r=n[s])&&(t=(a<3?r(t):a>3?r(e,i,t):r(e,i))||t);return a>3&&t&&Object.defineProperty(e,i,t),t},T=class{systemService;adapters=[];paginationResponse=new b;request;selectionType;adapterTypes;constructor(e){this.systemService=e}ngOnInit(){let e=f(y);e.unshift({type:null,description:"COMMON.ALL"}),this.adapterTypes=e,this.selectionType=this.adapterTypes[0].type,this.request=u.getEmptyModel(),this.getAdapters()}ngOnDestroy(){}pageChanged(e){this.request.pagination.skip=e.skip,this.request.pagination.take=e.take,this.getAdapters()}getAdapters(){this.systemService.getAdapters(this.request).subscribe(e=>{this.adapters=e.items||[],this.paginationResponse=e.pagination})}onModelChanged(e){this.request.type=this.selectionType,this.getAdapters()}static ctorParameters=()=>[{type:h}]};T=S([d({selector:"armon-manage-adapters",template:z,animations:k,standalone:!0,imports:[j,_,x,p,C,l,c,g,w,v],styles:[A]})],T);export{T as ManageAdaptersComponent};
