export const id=278;export const ids=[278];export const modules={278:(e,t,n)=>{n.r(t),n.d(t,{HaColorTempSelector:()=>c});var r=n(17463),i=n(68144),a=n(79932),l=n(47181),o=n(50856),s=n(28426);n(92197);class d extends s.H3{static get template(){return o.d` <style>:host{display:block}.title{margin:5px 0 8px;color:var(--primary-text-color)}.slider-container{display:flex}ha-icon{margin-top:4px;color:var(--secondary-text-color)}ha-slider{flex-grow:1;background-image:var(--ha-slider-background);border-radius:4px}</style> <div class="title">[[_getTitle()]]</div> <div class="extra-container"><slot name="extra"></slot></div> <div class="slider-container"> <ha-icon icon="[[icon]]" hidden$="[[!icon]]"></ha-icon> <ha-slider min="[[min]]" max="[[max]]" step="[[step]]" pin="[[pin]]" disabled="[[disabled]]" value="{{value}}"></ha-slider> </div> <template is="dom-if" if="[[helper]]"> <ha-input-helper-text>[[helper]]</ha-input-helper-text> </template> `}_getTitle(){return`${this.caption}${this.caption&&this.required?" *":""}`}static get properties(){return{caption:String,disabled:Boolean,required:Boolean,min:Number,max:Number,pin:Boolean,step:Number,helper:String,extra:{type:Boolean,value:!1},ignoreBarTouch:{type:Boolean,value:!0},icon:{type:String,value:""},value:{type:Number,notify:!0}}}}customElements.define("ha-labeled-slider",d);let c=(0,r.Z)([(0,a.Mo)("ha-selector-color_temp")],(function(e,t){return{F:class extends t{constructor(...t){super(...t),e(this)}},d:[{kind:"field",decorators:[(0,a.Cb)()],key:"hass",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"selector",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"value",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"label",value:void 0},{kind:"field",decorators:[(0,a.Cb)()],key:"helper",value:void 0},{kind:"field",decorators:[(0,a.Cb)({type:Boolean,reflect:!0})],key:"disabled",value:()=>!1},{kind:"field",decorators:[(0,a.Cb)({type:Boolean})],key:"required",value:()=>!0},{kind:"method",key:"render",value:function(){var e,t,n,r;return i.dy` <ha-labeled-slider pin icon="hass:thermometer" .caption="${this.label||""}" .min="${null!==(e=null===(t=this.selector.color_temp)||void 0===t?void 0:t.min_mireds)&&void 0!==e?e:153}" .max="${null!==(n=null===(r=this.selector.color_temp)||void 0===r?void 0:r.max_mireds)&&void 0!==n?n:500}" .value="${this.value}" .disabled="${this.disabled}" .helper="${this.helper}" .required="${this.required}" @change="${this._valueChanged}"></ha-labeled-slider> `}},{kind:"method",key:"_valueChanged",value:function(e){(0,l.B)(this,"value-changed",{value:Number(e.target.value)})}},{kind:"field",static:!0,key:"styles",value:()=>i.iv`ha-labeled-slider{--ha-slider-background:-webkit-linear-gradient(
        var(--float-end),
        rgb(255, 160, 0) 0%,
        white 50%,
        rgb(166, 209, 255) 100%
      );--paper-slider-knob-start-border-color:var(--primary-color)}`}]}}),i.oi)},92197:(e,t,n)=>{n(28138);const r=customElements.get("paper-slider");let i;customElements.define("ha-slider",class extends r{static get template(){if(!i){i=r.template.cloneNode(!0);i.content.querySelector("style").appendChild(document.createTextNode('\n          :host([dir="rtl"]) #sliderContainer.pin.expand > .slider-knob > .slider-knob-inner::after {\n            -webkit-transform: scale(1) translate(0, -17px) scaleX(-1) !important;\n            transform: scale(1) translate(0, -17px) scaleX(-1) !important;\n            }\n\n            .pin > .slider-knob > .slider-knob-inner {\n              font-size:  var(--ha-slider-pin-font-size, 15px);\n              line-height: normal;\n              cursor: pointer;\n            }\n\n            .disabled.ring > .slider-knob > .slider-knob-inner {\n              background-color: var(--paper-slider-disabled-knob-color, var(--disabled-text-color));\n              border: 2px solid var(--paper-slider-disabled-knob-color, var(--disabled-text-color));\n            }\n\n            .pin > .slider-knob > .slider-knob-inner::before {\n              top: unset;\n              margin-left: unset;\n\n              bottom: calc(15px + var(--calculated-paper-slider-height)/2);\n              left: 50%;\n              width: 2.6em;\n              height: 2.6em;\n\n              -webkit-transform-origin: left bottom;\n              transform-origin: left bottom;\n              -webkit-transform: rotate(-45deg) scale(0) translate(0);\n              transform: rotate(-45deg) scale(0) translate(0);\n            }\n\n            .pin.expand > .slider-knob > .slider-knob-inner::before {\n              -webkit-transform: rotate(-45deg) scale(1) translate(7px, -7px);\n              transform: rotate(-45deg) scale(1) translate(7px, -7px);\n            }\n\n            .pin > .slider-knob > .slider-knob-inner::after {\n              top: unset;\n              font-size: unset;\n\n              bottom: calc(15px + var(--calculated-paper-slider-height)/2);\n              left: 50%;\n              margin-left: -1.3em;\n              width: 2.6em;\n              height: 2.5em;\n\n              -webkit-transform-origin: center bottom;\n              transform-origin: center bottom;\n              -webkit-transform: scale(0) translate(0);\n              transform: scale(0) translate(0);\n            }\n\n            .pin.expand > .slider-knob > .slider-knob-inner::after {\n              -webkit-transform: scale(1) translate(0, -10px);\n              transform: scale(1) translate(0, -10px);\n            }\n\n            .slider-input {\n              width: 54px;\n            }\n        '))}return i}_setImmediateValue(e){super._setImmediateValue(this.step>=1?Math.round(e):Math.round(100*e)/100)}_calcStep(e){if(!this.step)return parseFloat(e);const t=Math.round((e-this.min)/this.step),n=this.step.toString(),r=n.indexOf(".");if(-1!==r){const e=10**(n.length-r-1);return Math.round((t*this.step+this.min)*e)/e}return t*this.step+this.min}})}};
//# sourceMappingURL=278-XJe5VPfTvhM.js.map