import{d as e,m as t,p as n,s as r,t as i,y as a}from"./hooks.module-5xe-uC6c.js";import{I as o,N as s,b as c,j as l}from"./content_renderer-CoENEE63.js";import{s as u}from"./options-CDt8ZGCW.js";import{t as d}from"./jsxRuntime.module--xb8gfv5.js";import{t as f}from"./note_autocomplete-CXZAuuiO.js";import{t as p}from"./FormGroup--CU8SFQh.js";import{t as m}from"./NoteAutocomplete-CVTb6kKc.js";e();function h({ntxId:e}){return d(a,{children:[d(_,{}),d(g,{ntxId:e??null})]})}function g({ntxId:e}){let n=i(null),r=i(null);return t(()=>{let e=s(r);f.showRecentNotes(e)},[]),d(a,{children:[d(p,{name:`empty-tab-search`,label:u(`empty.open_note_instruction`),className:`empty-tab-search`,children:d(m,{placeholder:u(`empty.search_placeholder`),container:n,inputRef:r,opts:{hideGoToSelectedNoteButton:!0,allowCreatingNotes:!0,allowJumpToSearchNotes:!0},onChange:t=>{if(!t?.notePath)return!1;let n=o.tabManager.getNoteContextById(e)??o.tabManager.getActiveContext();n&&n.setNote(t.notePath)}})}),d(`div`,{ref:n,className:`note-detail-empty-results`})]})}function _(){let[e,i]=r(),a=n(l);function o(){c.searchForNotes(`#workspace #!template`).then(i)}return t(o,[]),d(`div`,{class:`workspace-notes`,children:e?.map(e=>d(`div`,{className:`workspace-note`,title:u(`empty.enter_workspace`,{title:e.title}),onClick:()=>a?.triggerCommand(`hoistNote`,{noteId:e.noteId}),children:[d(`div`,{className:`${e.getIcon()} workspace-icon`}),d(`div`,{children:e.title})]}))})}export{h as default};