/**
 * @license
 * Copyright 2023 Tyler Technologies, Inc. 
 * License: Apache-2.0
 */
import{c as f,d as g}from"./chunk.2DXG2R3M.js";import{a as s}from"./chunk.KTGSZEAG.js";import{a as v,b as h}from"./chunk.DL7NX432.js";import{a as b,l as _}from"./chunk.LJLEPTLU.js";import{f as c,g as m}from"./chunk.4LA6HEA7.js";import{k as u}from"./chunk.J2M2MXP2.js";import{f as o}from"./chunk.MCIQXNKY.js";var R=`${h}ripple`,T={SURFACE:"mdc-ripple-surface"},E={TARGET:"target",UNBOUNDED:"unbounded"},e={elementName:R,classes:T,attributes:E};var r=class extends g{handleFocus(){this.foundation.handleFocus()}handleBlur(){this.foundation.handleBlur()}animate(){this.foundation.animateActivation()}},C=class extends f{};var n=class{constructor(t){this._component=t}_tryFindTarget(){return this._component.parentElement}initialize(t,d){t&&(this._target=(this._component.ownerDocument||document).querySelector(t)),this._target||(this._target=this._tryFindTarget()),this._target&&(this._ripple=new r(this._target),this._ripple.unbounded=d,c(e.classes.SURFACE,this._target))}destroy(){this._ripple&&(this._ripple.destroy(),this._ripple=void 0),this._target&&m(e.classes.SURFACE,this._target),this._target=void 0}activate(){var t;(t=this._ripple)==null||t.activate()}deactivate(){var t;(t=this._ripple)==null||t.deactivate()}};var p=class{constructor(t){this._adapter=t;this._unbounded=!1}initialize(){this._adapter.initialize(this._target,this._unbounded)}disconnect(){this._adapter.destroy()}layout(){this._applyTarget()}activate(){this._adapter.activate()}deactivate(){this._adapter.deactivate()}_applyTarget(){this._adapter.destroy(),this._adapter.initialize(this._target,this._unbounded)}get target(){return this._target}set target(t){this._target!==t&&(this._target=t,this._applyTarget())}get unbounded(){return this._unbounded}set unbounded(t){this._unbounded!==t&&(this._unbounded=t,this._applyTarget())}};var i=class extends _{constructor(){super();this._foundation=new p(new n(this))}static get observedAttributes(){return[e.attributes.TARGET,e.attributes.UNBOUNDED]}connectedCallback(){this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(d,y,l){switch(d){case e.attributes.TARGET:this.target=l;break;case e.attributes.UNBOUNDED:this.unbounded=u(l);break}}layout(){this._foundation.layout()}activate(){return this._foundation.activate()}deactivate(){return this._foundation.deactivate()}};o([s()],i.prototype,"target",2),o([s()],i.prototype,"unbounded",2),i=o([v({name:e.elementName})],i);function q(){b(i)}export{e as a,r as b,C as c,n as d,p as e,i as f,q as g};
//# sourceMappingURL=chunk.EC5JFSHR.js.map
