{"version":3,"file":"WildcardToolCallRender.cjs","names":["defineToolCallRenderer"],"sources":["../../src/components/WildcardToolCallRender.tsx"],"sourcesContent":["import { defineToolCallRenderer } from \"../types/defineToolCallRenderer\";\nimport { useState } from \"react\";\n\nexport const WildcardToolCallRender = defineToolCallRenderer({\n  name: \"*\",\n  render: ({ args, result, name, status }) => {\n    const [isExpanded, setIsExpanded] = useState(false);\n\n    const statusString = String(status) as\n      | \"inProgress\"\n      | \"executing\"\n      | \"complete\";\n    const isActive =\n      statusString === \"inProgress\" || statusString === \"executing\";\n    const isComplete = statusString === \"complete\";\n    const statusStyles = isActive\n      ? \"cpk:bg-amber-100 cpk:text-amber-800 cpk:dark:bg-amber-500/15 cpk:dark:text-amber-400\"\n      : isComplete\n        ? \"cpk:bg-emerald-100 cpk:text-emerald-800 cpk:dark:bg-emerald-500/15 cpk:dark:text-emerald-400\"\n        : \"cpk:bg-zinc-100 cpk:text-zinc-800 cpk:dark:bg-zinc-700/40 cpk:dark:text-zinc-300\";\n\n    return (\n      <div className=\"cpk:mt-2 cpk:pb-2\">\n        <div className=\"cpk:rounded-xl cpk:border cpk:border-zinc-200/60 cpk:dark:border-zinc-800/60 cpk:bg-white/70 cpk:dark:bg-zinc-900/50 cpk:shadow-sm cpk:backdrop-blur cpk:p-4\">\n          <div\n            className=\"cpk:flex cpk:items-center cpk:justify-between cpk:gap-3 cpk:cursor-pointer\"\n            onClick={() => setIsExpanded(!isExpanded)}\n          >\n            <div className=\"cpk:flex cpk:items-center cpk:gap-2 cpk:min-w-0\">\n              <svg\n                className={`cpk:h-4 cpk:w-4 cpk:text-zinc-500 cpk:dark:text-zinc-400 cpk:transition-transform ${\n                  isExpanded ? \"cpk:rotate-90\" : \"\"\n                }`}\n                fill=\"none\"\n                viewBox=\"0 0 24 24\"\n                strokeWidth={2}\n                stroke=\"currentColor\"\n              >\n                <path\n                  strokeLinecap=\"round\"\n                  strokeLinejoin=\"round\"\n                  d=\"M8.25 4.5l7.5 7.5-7.5 7.5\"\n                />\n              </svg>\n              <span className=\"cpk:inline-block cpk:h-2 cpk:w-2 cpk:rounded-full cpk:bg-blue-500\" />\n              <span className=\"cpk:truncate cpk:text-sm cpk:font-medium cpk:text-zinc-900 cpk:dark:text-zinc-100\">\n                {name}\n              </span>\n            </div>\n            <span\n              className={`cpk:inline-flex cpk:items-center cpk:rounded-full cpk:px-2 cpk:py-1 cpk:text-xs cpk:font-medium ${statusStyles}`}\n            >\n              {String(status)}\n            </span>\n          </div>\n\n          {isExpanded && (\n            <div className=\"cpk:mt-3 cpk:grid cpk:gap-4\">\n              <div>\n                <div className=\"cpk:text-xs cpk:uppercase cpk:tracking-wide cpk:text-zinc-500 cpk:dark:text-zinc-400\">\n                  Arguments\n                </div>\n                <pre className=\"cpk:mt-2 cpk:max-h-64 cpk:overflow-auto cpk:rounded-md cpk:bg-zinc-50 cpk:dark:bg-zinc-800/60 cpk:p-3 cpk:text-xs cpk:leading-relaxed cpk:text-zinc-800 cpk:dark:text-zinc-200 cpk:whitespace-pre-wrap cpk:break-words\">\n                  {JSON.stringify(args ?? {}, null, 2)}\n                </pre>\n              </div>\n\n              {result !== undefined && (\n                <div>\n                  <div className=\"cpk:text-xs cpk:uppercase cpk:tracking-wide cpk:text-zinc-500 cpk:dark:text-zinc-400\">\n                    Result\n                  </div>\n                  <pre className=\"cpk:mt-2 cpk:max-h-64 cpk:overflow-auto cpk:rounded-md cpk:bg-zinc-50 cpk:dark:bg-zinc-800/60 cpk:p-3 cpk:text-xs cpk:leading-relaxed cpk:text-zinc-800 cpk:dark:text-zinc-200 cpk:whitespace-pre-wrap cpk:break-words\">\n                    {typeof result === \"string\"\n                      ? result\n                      : JSON.stringify(result, null, 2)}\n                  </pre>\n                </div>\n              )}\n            </div>\n          )}\n        </div>\n      </div>\n    );\n  },\n});\n"],"mappings":";;;;;;AAGA,MAAa,yBAAyBA,sDAAuB;CAC3D,MAAM;CACN,SAAS,EAAE,MAAM,QAAQ,MAAM,aAAa;EAC1C,MAAM,CAAC,YAAY,qCAA0B,MAAM;EAEnD,MAAM,eAAe,OAAO,OAAO;AAanC,SACE,2CAAC;GAAI,WAAU;aACb,4CAAC;IAAI,WAAU;eACb,4CAAC;KACC,WAAU;KACV,eAAe,cAAc,CAAC,WAAW;gBAEzC,4CAAC;MAAI,WAAU;;OACb,2CAAC;QACC,WAAW,qFACT,aAAa,kBAAkB;QAEjC,MAAK;QACL,SAAQ;QACR,aAAa;QACb,QAAO;kBAEP,2CAAC;SACC,eAAc;SACd,gBAAe;SACf,GAAE;UACF;SACE;OACN,2CAAC,UAAK,WAAU,sEAAsE;OACtF,2CAAC;QAAK,WAAU;kBACb;SACI;;OACH,EACN,2CAAC;MACC,WAAW,mGArCnB,iBAAiB,gBAAgB,iBAAiB,cAGhD,yFAFe,iBAAiB,aAI9B,iGACA;gBAiCK,OAAO,OAAO;OACV;MACH,EAEL,cACC,4CAAC;KAAI,WAAU;gBACb,4CAAC,oBACC,2CAAC;MAAI,WAAU;gBAAuF;OAEhG,EACN,2CAAC;MAAI,WAAU;gBACZ,KAAK,UAAU,QAAQ,EAAE,EAAE,MAAM,EAAE;OAChC,IACF,EAEL,WAAW,UACV,4CAAC,oBACC,2CAAC;MAAI,WAAU;gBAAuF;OAEhG,EACN,2CAAC;MAAI,WAAU;gBACZ,OAAO,WAAW,WACf,SACA,KAAK,UAAU,QAAQ,MAAM,EAAE;OAC/B,IACF;MAEJ;KAEJ;IACF;;CAGX,CAAC"}