import{getLocaleFromRelativePath as h}from"../../../../fs/utils/get-locale-from-relative-path.js";import{convertDocumentToMarkdown as i,getSearchDocument as l}from"./utils.js";import{extractDocumentSearchFacets as g}from"../search-facets.js";const x=({label:c,groupName:r,metadata:n,actions:o,store:a,includeInLLMsTxt:s,llmstxtTitle:t})=>async m=>{const u=h(m.fsPath),f=g(o,n),e=D(c,r,m,a,u,f);if(e)return{async getLLMsTxts(){return[{slug:e.url,fsPath:m.fsPath,title:t||e.title,content:e.content,includeInLLMsTxt:s}]},async getSearchDocuments(){return[e]}}};function D(c,r,n,o,a,s){const t=l(c,r,o);if(t?.name)return{url:n.slug,fsPath:n.fsPath,content:i(t),title:t.name,locale:a,facets:s}}export{x as getAiDocumentsStore};
