import{a as N,b as j,c as G,e as L}from"./chunk-OFYIPW5Z.js";import{a as T}from"./chunk-QPSW2ZIJ.js";import{Tc as B,Uc as I,Yc as d}from"./chunk-ATD4AEXQ.js";import{$c as H,Bb as E,Ka as r,Kc as k,Mb as s,Nb as M,Oa as h,Pb as S,Qb as l,Rb as p,Ta as C,Ua as m,Ub as v,Vb as F,Wb as W,bd as _,da as g,fc as b,gc as y,hb as x,ib as f,nb as P,ob as t,pb as i,qb as w,xa as u}from"./chunk-BXH3QC5E.js";function D(n,A){if(n&1&&(t(0,"div",9)(1,"span"),l(2),i()()),n&2){let e=E();s("background",e.foregroundColor)("color",e.textColorForForegroundColor),M("hide-header-text",e.panelExpandedState),r(2),p(e.washingProcess==null?null:e.washingProcess.description)}}var X=(()=>{class n{soundConfigurationManager;class="abs-washing-process-expansion-panel";panelExpandedState;washingProcess;previousWashingProcess;textColorForBackgroundColor;textColorForForegroundColor;backgroundColor;foregroundColor;nearestHexColor;constructor(e){this.soundConfigurationManager=e}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 \u0275fac=function(a){return new(a||n)(h(T))};static \u0275cmp=C({type:n,selectors:[["abs-washing-process-expansion-panel"]],hostVars:2,hostBindings:function(a,o){a&2&&S(o.class)},inputs:{panelExpandedState:"panelExpandedState",washingProcess:"washingProcess",previousWashingProcess:"previousWashingProcess"},standalone:!1,features:[u],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"],[1,"washing-process-header-text",3,"hide-header-text","background","color"],[1,"washing-process-expanded-row"],[1,"washing-process-description"],[1,"washing-process-text"],[1,"washing-process-header-text"]],template:function(a,o){a&1&&(t(0,"mat-expansion-panel",0),W("expandedChange",function(c){return F(o.panelExpandedState,c)||(o.panelExpandedState=c),c}),t(1,"mat-expansion-panel-header",1)(2,"mat-panel-title",2),w(3,"mat-icon",3),t(4,"span",4),l(5),b(6,"translate"),i()(),x(7,D,3,7,"div",5),i(),t(8,"div",6)(9,"div",7)(10,"span",8),l(11),i()()()()),a&2&&(s("background",o.backgroundColor),v("expanded",o.panelExpandedState),P("disabled",!o.washingProcess),r(3),s("color",o.foregroundColor),r(),s("color",o.textColorForBackgroundColor),r(),p(y(6,13,"LBL_WASHING_PROCESS")),r(2),f(o.washingProcess?7:-1),r(2),s("color",o.textColorForBackgroundColor),r(2),p(o.washingProcess==null?null:o.washingProcess.description))},dependencies:[N,j,G,B,H],encapsulation:2})}return n})();var $=(()=>{class n{static \u0275fac=function(a){return new(a||n)};static \u0275mod=m({type:n});static \u0275inj=g({imports:[k,L,I,_]})}return n})();export{X as a,$ as b};
