/*!
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{computed as t,openBlock as e,createElementBlock as i,createElementVNode as a,renderSlot as r,Fragment as o,renderList as n,createBlock as l,unref as s,withCtx as c,createTextVNode as d,toDisplayString as f}from"vue";import{useLocale as u}from"../../../hooks/useLocale.js";import{GscButton as p}from"../../../Button/index.js";import './ActionBar.css';/* empty css              */import y from"../../../_virtual/_plugin-vue_export-helper.js";const v={class:"flex items-center justify-between"},m={class:"flex items-center gap-2"},g={class:"flex items-center gap-2"},x=/* @__PURE__ */y({__name:"ActionBar",props:{loading:{type:Boolean,default:!1},leftActions:{type:Array,default:()=>[]},rightActions:{type:Array,default:()=>[]}},emits:["export","info","action"],setup(y,{emit:x}){const k=y,A=x,{t:_}=u(),h=t(()=>{const t=Array.isArray(k.leftActions)?k.leftActions:[];return t.length?t:[{key:"export",text:_("gsc.grid.actionBar.export"),variant:"primary"},{key:"info",text:_("gsc.grid.actionBar.info"),variant:"default"}]}),b=t(()=>Array.isArray(k.rightActions)?k.rightActions:[]);function B(t){const e=t?.key;A("action",{key:e,action:t}),"export"===e&&A("export"),"info"===e&&A("info");try{t?.onClick?.()}catch{}}return(t,u)=>(e(),i("div",v,[a("div",m,[r(t.$slots,"left",{},()=>[(e(!0),i(o,null,n(h.value,t=>(e(),l(s(p),{key:t.key,variant:t.variant||"default",disabled:y.loading||!!t.disabled,onClick:e=>B(t)},{default:c(()=>[d(f(t.text),1)]),_:2},1032,["variant","disabled","onClick"]))),128))],!0)]),a("div",g,[(e(!0),i(o,null,n(b.value,t=>(e(),l(s(p),{key:t.key,variant:t.variant||"default",disabled:y.loading||!!t.disabled,onClick:e=>B(t)},{default:c(()=>[d(f(t.text),1)]),_:2},1032,["variant","disabled","onClick"]))),128)),r(t.$slots,"right",{},void 0,!0)])]))}},[["__scopeId","data-v-cc57d7a0"]]);export{x as default};