import{j as e}from"./app-k86Ef-z9.js";import{u as s,w as u}from"./xlsx-xCRnwQcp.js";import{S as h}from"./search-B95qJbnL.js";import{c as w}from"./createLucideIcon-0-ULngH7.js";import{D as g}from"./download-Bm-atdR1.js";/**
* @license lucide-react v0.474.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const y=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]],b=w("ArrowDownUp",y),D=({sheetNames:n,activeSheet:c,onSheetChange:d,onSearch:i,onSort:m,currentSheet:a,fileName:x})=>{const r=t=>{const o=a.data,l=s.book_new(),p=s.aoa_to_sheet(o);s.book_append_sheet(l,p,a.name),u(l,`${x.split(".")[0]}.${t}`)};return e.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-center px-4 py-3 bg-white border-b border-gray-200 sticky top-0 z-10 space-y-2 md:space-y-0",children:[e.jsx("div",{className:"flex flex-wrap gap-1 w-full md:w-auto",children:n.map((t,o)=>e.jsx("button",{className:`px-3 py-1.5 text-sm rounded-md transition-colors ${c===o?"bg-blue-100 text-blue-700 font-medium":"bg-gray-100 text-gray-700 hover:bg-gray-200"}`,onClick:()=>d(o),children:t},o))}),e.jsxs("div",{className:"flex items-center space-x-2 w-full md:w-auto",children:[e.jsxs("div",{className:"relative flex-grow md:max-w-xs",children:[e.jsx(h,{className:"absolute left-2 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),e.jsx("input",{type:"text",placeholder:"Search in sheet...",className:"w-full pl-8 pr-3 py-1.5 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500",onChange:t=>i(t.target.value)})]}),e.jsx("button",{className:"p-1.5 rounded-md text-gray-700 hover:bg-gray-100 transition-colors",onClick:m,title:"Sort by column",children:e.jsx(b,{className:"w-4 h-4"})}),e.jsxs("div",{className:"relative group",children:[e.jsx("button",{className:"p-1.5 rounded-md text-gray-700 hover:bg-gray-100 transition-colors",title:"Download options",children:e.jsx(g,{className:"w-4 h-4"})}),e.jsxs("div",{className:"absolute right-0 mt-1 w-36 bg-white shadow-lg rounded-md py-1 hidden group-hover:block z-20",children:[e.jsx("button",{className:"w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",onClick:()=>r("xlsx"),children:"Download XLSX"}),e.jsx("button",{className:"w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100",onClick:()=>r("csv"),children:"Download CSV"})]})]})]})]})};export{D as default};
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]