import{r as o,j as s}from"./vendor-react-Dp9pL_Wn.js";import{L as r,t as e,v as i,w as n}from"./c6eedc03a-CsEFTfjy.js";import{F as d,I as t}from"./index-CBEPphRm.js";import{n as a}from"./vendor-lodash-BvMLws5K.js";import{M as m}from"./vendor-motion-EDlUw66k.js";import"./vendor-ant-cds-bBedrtIN.js";import"./vendor-base-ui-DNypCIlh.js";import"./vendor-radix-Ch96tRrt.js";import"./vendor-base-5_f7mmWg.js";import"./vendor-virtual-DRz8lJfQ.js";import"./vendor-intl-D2wGIp4M.js";import"./vendor-zod-0xcuG3aM.js";import"./vendor-zustand-BeF8W8xk.js";import"./vendor-icons-CokWnmlw.js";import"./vendor-router-qG5OCEmI.js";import"./vendor-query-BwvgHhJ1.js";import"./vendor-zod-v3-CZy0YPWu.js";import"./vendor-luxon-CZxT8ieM.js";import"./vendor-growthbook-C66YtMMX.js";import"./vendor-infra-DayZK7Ds.js";import"./caf7c7e06-DJYXCm3T.js";import"./c5669b8e4-DFSq88jr.js";import"./c5f4e1303-CiyIFgnl.js";import"./cbaad2c48-DaP34LG2.js";const c=o.memo(({sessionId:c,permissions:p,isScheduledTask:l,source:j})=>{const v=function(){const s=d();return o.useCallback((o,n,d,t,m)=>{if(m?.respond&&("once"===t||"deny"===t||"always"===t))return s(o,m.toolUseId),void m.respond(t,d).catch(a);r?.respondToToolPermission?(s(o,n),r.respondToToolPermission(n,t,d)):e.error(i.DESKTOP_API,"respondToToolPermission not available")},[s])}(),{track:u}=n(),b=o.useCallback((o,s,r,e)=>{v(c,o,r,e,p.find(o=>o.toolUseId===s)),u({event_key:"claudeai.cowork.inline_review.decision",session_id:c,source:j,decision:e})},[v,c,j,u,p]);return s.jsx(m,{reducedMotion:"always",children:s.jsx("div",{className:"[&>*]:!my-0 [&>*>*]:!border-0 [&>*>*]:!shadow-none",children:s.jsx(t,{toolPermissionRequests:p,onToolDecision:b,isScheduledTask:l,disableKeyboardShortcuts:!0})})})});c.displayName="InlineToolApproval";export{c as InlineToolApproval};
