<script lang="ts">
  export let onCapture: (input: { sourceType: string; body: string }) => void = () => {};

  let body = '';
  let sourceType = 'text';

  function submit() {
    onCapture({ sourceType, body });
    body = '';
  }
</script>

<section aria-label="项目 Inbox" class="inbox-panel">
  <select aria-label="收集类型" bind:value={sourceType}>
    <option value="text">文本</option>
    <option value="link">链接</option>
    <option value="file">文件</option>
  </select>
  <textarea aria-label="收集内容" bind:value={body}></textarea>
  <div class="toolbar">
    <button type="button" on:click={submit}>保存到 Inbox</button>
    <button type="button">分析/整理</button>
  </div>
</section>
