import{a as e}from"./chunk-D9Tnb9aB.js";import{t}from"./codemirror-DtW92bSi.js";import{t as n}from"./show-hint-C34nt5SL.js";import{a as r,r as i}from"./esm-Cwe9HyTf.js";var a=e(t());n(),a.default.registerHelper(`hint`,`graphql`,(e,t)=>{let{schema:n,externalFragments:o,autocompleteOptions:s}=t;if(!n)return;let c=e.getCursor(),l=e.getTokenAt(c),u=l.type!==null&&/"|\w/.test(l.string[0])?l.start:l.end,d=new i(c.line,u),f={list:r(n,e.getValue(),d,l,o,s).map(e=>({text:e?.rawInsert??e.label,type:e.type,description:e.documentation,isDeprecated:e.isDeprecated,deprecationReason:e.deprecationReason})),from:{line:c.line,ch:u},to:{line:c.line,ch:l.end}};return f?.list&&f.list.length>0&&(f.from=a.default.Pos(f.from.line,f.from.ch),f.to=a.default.Pos(f.to.line,f.to.ch),a.default.signal(e,`hasCompletion`,e,f,l)),f});
//# sourceMappingURL=hint-DCM9Lx-a.js.map