import{V as t}from"./p-6e1ab235.js";import{c as s}from"./p-6a334573.js";import{C as a}from"./p-2d0d575f.js";import{O as o}from"./p-331a62d5.js";import{k as m,j as p}from"./p-6c43d54a.js";import{d as i}from"./p-f28a6074.js";class e extends t{constructor({propName:t}){super(),this.isAcceptableObserverPayload=t=>t.host===this.host&&t.stateName===this.propName,this.propName=t}connectedCallback(){this.subStateObserver=new o(this.isAcceptableObserverPayload.bind(this),(t=>{t.callback(this.propValue)})),a.register(i.getSubject(this.host,m),this.subStateObserver)}disconnectedCallback(){a.unregister(i.getSubject(this.host,m),this.subStateObserver)}subStateNotify(){a.notify(i.getSubject(this.host,p),{host:this.host,stateName:this.propName,value:this.propValue})}}function c(t,a,o){const m=[{mapFrom:"connectedCallback",mapTo:"connectedCallback"},{mapFrom:"disconnectedCallback",mapTo:"disconnectedCallback"}];return o&&m.push({mapFrom:o,mapTo:"subStateNotify"}),s(t,e,[{mapFrom:"host",mapTo:"host"},{mapFrom:a,mapTo:"propValue"}],m,[{propName:a}])}export{c}