import{a}from"./prompts-BBxcmVYy.js";class s{constructor(i){this.attachments=i}getData(){return{attachments:this.attachments.map(t=>({id:t.id,fileName:t.fileName,mimeType:t.mimeType,size:t.size,content:t.content,extractedText:t.extractedText}))}}getRuntime(){return i=>{window.listAttachments=()=>(window.attachments||[]).map(t=>({id:t.id,fileName:t.fileName,mimeType:t.mimeType,size:t.size})),window.readTextAttachment=t=>{const e=(window.attachments||[]).find(r=>r.id===t);if(!e)throw new Error(`Attachment not found: ${t}`);if(e.extractedText)return e.extractedText;try{return atob(e.content)}catch{throw new Error(`Failed to decode text content for: ${t}`)}},window.readBinaryAttachment=t=>{const e=(window.attachments||[]).find(n=>n.id===t);if(!e)throw new Error(`Attachment not found: ${t}`);const r=atob(e.content),o=new Uint8Array(r.length);for(let n=0;n<r.length;n++)o[n]=r.charCodeAt(n);return o}}}getDescription(){return a}}export{s as AttachmentsRuntimeProvider};
