text: Object.defineProperty(exports,"__esModule",{value:!0}),exports.EditableTableFilter=void 0;var e=require("lit-element/lit-element.js"),t=require("./editable-table-behaviors.js");function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _templateObject2_b96550e0af6311ebbe560fe9c4727db1(){var e=_taggedTemplateLiteral(["\n        #filter-off {\n          opacity: 0.25;\n        }\n        :host(:not([filtered])) .filtered,\n        :host(:not([filtered]):not(:focus):not(:hover)) #filter,\n        :host(:not([filtered]):focus) #filter-off,\n        :host(:not([filtered]):hover) #filter-off,\n        :host([filtered]:not(:focus):not(:hover)) #filter-off,\n        :host([filtered]:focus) #filter,\n        :host([filtered]:hover) #filter {\n          display: none;\n        }\n      "]);return _templateObject2_b96550e0af6311ebbe560fe9c4727db1=function _templateObject2_b96550e0af6311ebbe560fe9c4727db1(){return e},e}function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function _iterableToArray(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function _templateObject_b96550e0af6311ebbe560fe9c4727db1(){var e=_taggedTemplateLiteral(['\n      <button id="button" class="cell-button" @click="','">\n        <span><slot></slot></span>\n        <span class="sr-only" .hidden="','"> (filtered)</span>\n        <span class="sr-only"> Toggle filter.</span>\n        <simple-icon-lite\n          id="filter"\n          icon="editable-table:filter"\n        ></simple-icon-lite>\n        <simple-icon-lite\n          id="filter-off"\n          icon="editable-table:filter-off"\n        ></simple-icon-lite>\n      </button>\n      <simple-tooltip for="button"\n        >Toggle Column ',' filter for "<slot\n        ></slot>"</simple-tooltip\n      >\n    ']);return _templateObject_b96550e0af6311ebbe560fe9c4727db1=function _templateObject_b96550e0af6311ebbe560fe9c4727db1(){return e},e}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e})(e,t)}function _get(e,t,n){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function _get(e,t,n){var r=function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}require("@lrnwebcomponents/simple-tooltip/simple-tooltip.js"),require("@lrnwebcomponents/simple-icon/lib/simple-icon-lite.js"),require("@lrnwebcomponents/simple-icon/lib/simple-icons.js"),require("@lrnwebcomponents/simple-icon/lib/simple-icon-button-lite.js"),require("@lrnwebcomponents/hax-iconset/lib/simple-hax-iconset.js");var n=function(n){function EditableTableFilter(){var e;return function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,EditableTableFilter),(e=_possibleConstructorReturn(this,_getPrototypeOf(EditableTableFilter).call(this))).columnIndex=null,e.filtered=!1,e.text="",e}return function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}(EditableTableFilter,e.LitElement),_createClass(EditableTableFilter,[{key:"render",value:function render(){return(0,e.html)(_templateObject_b96550e0af6311ebbe560fe9c4727db1(),this._onFilterClicked,!this.filtered,this.columnIndex)}}],[{key:"styles",get:function get(){return[].concat(_toConsumableArray(_get(_getPrototypeOf(EditableTableFilter),"styles",this)||[]),_toConsumableArray(t.editableTableCellStyles),[(0,e.css)(_templateObject2_b96550e0af6311ebbe560fe9c4727db1())])}},{key:"tag",get:function get(){return"editable-table-filter"}}]),_createClass(EditableTableFilter,[{key:"_getPressed",value:function _getPressed(e){return e?"true":"false"}},{key:"_onFilterClicked",value:function _onFilterClicked(){this.dispatchEvent(new CustomEvent("toggle-filter",{bubbles:!0,cancelable:!0,composed:!0,detail:this}))}}],[{key:"properties",get:function get(){return{columnIndex:{type:Number,attribute:"column-index"},filtered:{type:Boolean,reflect:!0},text:{type:String}}}}]),EditableTableFilter}();exports.EditableTableFilter=n,window.customElements.define(n.tag,n);