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-3a93730e.js";import{d as e}from"./p-11e2dcf5.js";class i 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(e.getSubject(this.host,m),this.subStateObserver)}disconnectedCallback(){a.unregister(e.getSubject(this.host,m),this.subStateObserver)}subStateNotify(){a.notify(e.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,i,[{mapFrom:"host",mapTo:"host"},{mapFrom:a,mapTo:"propValue"}],m,[{propName:a}])}export{c}