/*!
Copyright (c) 2026 Lenovo SSG BASD. All rights reserved.
@license Proprietary

This software is the confidential and proprietary property of Lenovo SSG BASD.
You shall not disclose such Confidential Information and shall use it only in
accordance with the terms of the license agreement.

--- Build Info ---
Version: 1.1.1
Build Time: 2026/2/26 17:21:00
Build Commit: 81e556ed827e2f043668506dae6fae8dbb9ef395
*/
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./ColumnFilter.css');const e=require("vue"),t=require("../../../hooks/useLocale.js"),l=require("../../../Button/index.js");;/* empty css                   */const o=require("../../../_virtual/_plugin-vue_export-helper.js"),a={value:""},r=["value"],n=["onKeydown"],u={class:"mt-3 flex gap-2 justify-end"},i={__name:"ColumnFilter",props:{value:[String,Number],type:{type:String,default:"text"},options:Array},emits:["update:value","apply","clear"],setup(o,{emit:i}){const c=o,s=i,{t:p}=t.useLocale(),d=e.ref(c.value??"");function v(){s("update:value",d.value),s("apply")}function m(){d.value="",s("update:value",""),s("clear")}return e.watch(()=>c.value,e=>{d.value=e??""}),(t,i)=>(e.openBlock(),e.createElementBlock("div",{class:"gsc-popover absolute top-full left-0 mt-2 min-w-44 p-3 z-20",onClick:i[2]||(i[2]=e.withModifiers(()=>{},["stop"]))},["select"===o.type?e.withDirectives((e.openBlock(),e.createElementBlock("select",{key:0,"onUpdate:modelValue":i[0]||(i[0]=e=>d.value=e),class:"gsc-control"},[e.createElementVNode("option",a,e.toDisplayString(e.unref(p)("gsc.grid.columnFilter.all")),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.options||[],t=>(e.openBlock(),e.createElementBlock("option",{key:t.value,value:t.value},e.toDisplayString(t.label),9,r))),128))],512)),[[e.vModelSelect,d.value]]):e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:1,"onUpdate:modelValue":i[1]||(i[1]=e=>d.value=e),type:"text",class:"gsc-control",onKeydown:e.withKeys(e.withModifiers(v,["prevent"]),["enter"])},null,40,n)),[[e.vModelText,d.value]]),e.createElementVNode("div",u,[e.createVNode(e.unref(l.GscButton),{variant:"default",onClick:m},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(p)("gsc.grid.columnFilter.clear")),1)]),_:1}),e.createVNode(e.unref(l.GscButton),{variant:"primary",onClick:v},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(p)("gsc.grid.columnFilter.apply")),1)]),_:1})])]))}},c=o.default(i,[["__scopeId","data-v-a0a8794b"]]);exports.default=c;