import{V as t}from"./p-dcc98162.js";import{c as s}from"./p-9ec80349.js";import{C as o}from"./p-816f6fc6.js";import{O as a}from"./p-331a62d5.js";import{k as c,j as m}from"./p-72158667.js";import{d as p}from"./p-243c99c3.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 a(this.isAcceptableObserverPayload.bind(this),(t=>{t.callback(this.propValue)})),o.register(p.getSubject(this.host,c),this.subStateObserver)}disconnectedCallback(){o.unregister(p.getSubject(this.host,c),this.subStateObserver)}subStateNotify(){o.notify(p.getSubject(this.host,m),{host:this.host,stateName:this.propName,value:this.propValue})}}function e(t,o,a){const c=[{mapFrom:"connectedCallback",mapTo:"connectedCallback"},{mapFrom:"disconnectedCallback",mapTo:"disconnectedCallback"}];return a&&c.push({mapFrom:a,mapTo:"subStateNotify"}),s(t,i,[{mapFrom:"host",mapTo:"host"},{mapFrom:o,mapTo:"propValue"}],c,[{propName:o}])}export{e as c}