"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),a=require("../index-DEZRGktf.js"),n=require("lucide-react");require("react-router-dom");require("react-dom");function i(t){const[s,r]=l.useState("");return e.jsx("div",{className:"w-full max-w-lg mx-auto",children:e.jsx(a.MacOSSearchBar,{...t,value:s,onChange:r,onClear:()=>r(""),onSubmit:o=>alert(`Submitted: ${o}`)})})}const c=()=>{const[t,s]=l.useState("");return e.jsxs(e.Fragment,{children:[e.jsx(a.HeroCard,{title:"SearchBar",description:"A macOS-style search input with clear button, keyboard submit, auto-focus, and multiple sizes. Includes smooth transitions and icon accent matching the system appearance.",icon:e.jsx("div",{className:"w-20 h-20 sm:w-24 sm:h-24 md:w-32 md:h-32 bg-linear-to-br from-cyan-500 via-blue-500 to-indigo-600 rounded-full flex items-center justify-center shadow-lg border border-cyan-500/50",children:e.jsx(n.Search,{className:"w-10 h-10 sm:w-12 sm:h-12 md:w-16 md:h-16 text-white filter drop-shadow-lg"})})}),e.jsx(a.CardContainer,{className:"overflow-hidden",children:e.jsx(a.CardTitle,{title:"Interactive",className:"mt-2 mb-2",children:e.jsxs("div",{className:"w-full p-4 sm:p-6 max-w-lg mx-auto",children:[e.jsx(a.MacOSSearchBar,{value:t,onChange:s,onClear:()=>s(""),onSubmit:r=>alert(`Search: ${r}`),placeholder:"Search files, apps, settings…"}),e.jsxs("p",{className:"mt-3 text-xs text-gray-500 dark:text-gray-400 text-center",children:["Current value: ",e.jsx("code",{className:"bg-gray-100 dark:bg-gray-800 px-1 rounded",children:t||"(empty)"})]})]})})}),e.jsx(a.CardContainer,{className:"overflow-hidden",children:e.jsx(a.CardTitle,{title:"Sizes",className:"mt-2 mb-2",children:e.jsx("div",{className:"w-full p-4 sm:p-6 space-y-4 max-w-lg mx-auto",children:["sm","md","lg"].map(r=>e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-medium text-gray-500 dark:text-gray-400 mb-1 uppercase",children:r}),e.jsx(a.MacOSSearchBar,{size:r,placeholder:`Size: ${r}`,value:"",onChange:()=>{}})]},r))})})}),e.jsx(a.PropPlayground,{componentName:"MacOSSearchBar",defaultValues:{placeholder:"Search…",size:"md",autoFocus:!1},controlOverrides:[{name:"placeholder",type:"text",description:"Placeholder text"},{name:"size",type:"select",options:["sm","md","lg"],description:"Input size"},{name:"autoFocus",type:"boolean",description:"Auto-focus on mount"}],includeProps:["placeholder","size","autoFocus"],excludeProps:["className","value","onChange","onClear","onSubmit"],children:r=>e.jsx(i,{...r})}),e.jsx(a.AutoPropsTable,{componentName:"MacOSSearchBar"}),e.jsx(a.CardContainer,{className:"overflow-hidden",children:e.jsx(a.CardTitle,{title:"Code Example",className:"mt-2 mb-2",children:e.jsx("div",{className:"w-full p-4 sm:p-6",children:e.jsx(a.CodeBlock,{language:"tsx",code:`import { MacOSSearchBar } from '@e-burgos/tucu-ui';

function SearchDemo() {
  const [value, setValue] = useState('');

  return (
    <MacOSSearchBar
      value={value}
      onChange={setValue}
      onClear={() => setValue('')}
      onSubmit={(v) => console.log('Search:', v)}
      placeholder="Search files, apps, settings…"
      size="md"       // 'sm' | 'md' | 'lg'
      autoFocus={false}
    />
  );
}`})})})})]})};exports.MacOSSearchBarSection=c;exports.default=c;
