import{G as e}from"./vaadin-grid-69a293c4.js";import"./vaadin-grid-filter-746f865b.js";
/**
 * @license
 * Copyright (c) 2021 Vaadin Ltd.
 * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
 */class t extends e{static get is(){return"vaadin-grid-filter-column"}static get properties(){return{path:String,header:String}}static get observers(){return["_onHeaderRendererOrBindingChanged(_headerRenderer, _headerCell, path, header, _filterValue)"]}constructor(){super(),this.__boundOnFilterValueChanged=this.__onFilterValueChanged.bind(this)}_defaultHeaderRenderer(e,t){let r=e.firstElementChild,a=r?r.firstElementChild:void 0;r||(r=document.createElement("vaadin-grid-filter"),a=document.createElement("vaadin-text-field"),a.setAttribute("slot","filter"),a.setAttribute("theme","small"),a.setAttribute("style","max-width: 100%;"),a.setAttribute("focus-target",""),a.addEventListener("value-changed",this.__boundOnFilterValueChanged),r.appendChild(a),e.appendChild(r)),r.path=this.path,r.value=this._filterValue,a.__rendererValue=this._filterValue,a.value=this._filterValue,a.label=this.__getHeader(this.header,this.path)}_computeHeaderRenderer(){return this._defaultHeaderRenderer}__onFilterValueChanged(e){e.detail.value!==e.target.__rendererValue&&(this._filterValue=e.detail.value)}__getHeader(e,t){return e||(t?this._generateHeader(t):void 0)}}customElements.define(t.is,t);
