/*!
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
*/
import{ref as e,watch as l,openBlock as t,createElementBlock as a,withModifiers as o,withDirectives as u,createElementVNode as n,toDisplayString as p,unref as r,Fragment as i,renderList as s,vModelSelect as c,withKeys as v,vModelText as m,createVNode as d,withCtx as f,createTextVNode as y}from"vue";import{useLocale as g}from"../../../hooks/useLocale.js";import{GscButton as _}from"../../../Button/index.js";import './ColumnFilter.css';/* empty css                 */import k from"../../../_virtual/_plugin-vue_export-helper.js";const x={value:""},j=["value"],C=["onKeydown"],F={class:"mt-3 flex gap-2 justify-end"},b=/* @__PURE__ */k({__name:"ColumnFilter",props:{value:[String,Number],type:{type:String,default:"text"},options:Array},emits:["update:value","apply","clear"],setup(k,{emit:b}){const w=k,h=b,{t:K}=g(),S=e(w.value??"");function U(){h("update:value",S.value),h("apply")}function V(){S.value="",h("update:value",""),h("clear")}return l(()=>w.value,e=>{S.value=e??""}),(e,l)=>(t(),a("div",{class:"gsc-popover absolute top-full left-0 mt-2 min-w-44 p-3 z-20",onClick:l[2]||(l[2]=o(()=>{},["stop"]))},["select"===k.type?u((t(),a("select",{key:0,"onUpdate:modelValue":l[0]||(l[0]=e=>S.value=e),class:"gsc-control"},[n("option",x,p(r(K)("gsc.grid.columnFilter.all")),1),(t(!0),a(i,null,s(k.options||[],e=>(t(),a("option",{key:e.value,value:e.value},p(e.label),9,j))),128))],512)),[[c,S.value]]):u((t(),a("input",{key:1,"onUpdate:modelValue":l[1]||(l[1]=e=>S.value=e),type:"text",class:"gsc-control",onKeydown:v(o(U,["prevent"]),["enter"])},null,40,C)),[[m,S.value]]),n("div",F,[d(r(_),{variant:"default",onClick:V},{default:f(()=>[y(p(r(K)("gsc.grid.columnFilter.clear")),1)]),_:1}),d(r(_),{variant:"primary",onClick:U},{default:f(()=>[y(p(r(K)("gsc.grid.columnFilter.apply")),1)]),_:1})])]))}},[["__scopeId","data-v-a0a8794b"]]);export{b as default};