import{a as d}from"./chunk-T2ZXHDV7.js";import{a as N,b as j,c as G,e as L}from"./chunk-MHXW6RFZ.js";import{a as T}from"./chunk-DA4237PP.js";import{ad as H,bd as B}from"./chunk-CBXQYRPM.js";import{Bc as I,Ka as s,Kb as l,La as x,Lb as p,Ob as v,Pb as S,Qb as y,Sc as _,Tc as k,Zb as W,_b as b,ab as f,cb as g,da as h,db as a,eb as P,gb as w,ka as u,la as m,mb as i,nb as r,ob as E,pa as C,tc as F,xb as M}from"./chunk-LVXYIJUI.js";function D(n,A){if(n&1&&(i(0,"div",9)(1,"span"),l(2),r()()),n&2){let e=M();a("background",e.foregroundColor)("color",e.textColorForForegroundColor),P("hide-header-text",e.panelExpandedState),s(2),p(e.washingProcess==null?null:e.washingProcess.description)}}var Y=(()=>{class n{constructor(e){this.soundConfigurationManager=e,this.class="abs-washing-process-expansion-panel"}ngOnChanges(e){e.washingProcess&&this.washingProcess?this.updateColors():this.resetColors(),e.previousWashingProcess&&this.previousWashingProcess&&this.soundConfigurationManager.playWashingProcessSound()}resetColors(){this.backgroundColor=null,this.foregroundColor=null,this.textColorForBackgroundColor=null,this.textColorForForegroundColor=null}updateColors(){this.nearestHexColor=d.getNearestHexColor(this.washingProcess?.color),this.backgroundColor=`#${this.nearestHexColor.backgroundColor}`,this.foregroundColor=`#${this.nearestHexColor.foregroundColor}`,this.textColorForBackgroundColor=`#${d.getHighestContrastTextColor(this.nearestHexColor.backgroundColor)}`,this.textColorForForegroundColor=`#${d.getHighestContrastTextColor(this.nearestHexColor.foregroundColor)}`}static{this.\u0275fac=function(t){return new(t||n)(x(T))}}static{this.\u0275cmp=u({type:n,selectors:[["abs-washing-process-expansion-panel"]],hostVars:2,hostBindings:function(t,o){t&2&&w(o.class)},inputs:{panelExpandedState:"panelExpandedState",washingProcess:"washingProcess",previousWashingProcess:"previousWashingProcess"},features:[C],decls:12,vars:15,consts:[[1,"abs-expansion-panel",3,"expandedChange","expanded","disabled"],[1,"abs-expansion-panel-header"],[1,"abs-panel-title"],["svgIcon","washing-machine",1,"panel-title-icon"],[1,"panel-title-text"],["class","washing-process-header-text",3,"hide-header-text","background","color",4,"ngIf"],[1,"washing-process-expanded-row"],[1,"washing-process-description"],[1,"washing-process-text"],[1,"washing-process-header-text"]],template:function(t,o){t&1&&(i(0,"mat-expansion-panel",0),y("expandedChange",function(c){return S(o.panelExpandedState,c)||(o.panelExpandedState=c),c}),i(1,"mat-expansion-panel-header",1)(2,"mat-panel-title",2),E(3,"mat-icon",3),i(4,"span",4),l(5),W(6,"translate"),r()(),f(7,D,3,7,"div",5),r(),i(8,"div",6)(9,"div",7)(10,"span",8),l(11),r()()()()),t&2&&(a("background",o.backgroundColor),v("expanded",o.panelExpandedState),g("disabled",!o.washingProcess),s(3),a("color",o.foregroundColor),s(),a("color",o.textColorForBackgroundColor),s(),p(b(6,13,"LBL_WASHING_PROCESS")),s(2),g("ngIf",o.washingProcess),s(2),a("color",o.textColorForBackgroundColor),s(2),p(o.washingProcess==null?null:o.washingProcess.description))},dependencies:[F,N,j,G,H,_],encapsulation:2})}}return n})();var $=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275mod=m({type:n})}static{this.\u0275inj=h({imports:[I,L,B,k]})}}return n})();export{Y as a,$ as b};
