1import{j as e}from"./react-vendor-DbzdS4FP.js";import{ProviderIcon as h}from"./ProviderIconComponent-BxmHkMKR.js";import{modelKey as u}from"./modelSelectorModels-DMgK-EX7.js";import{s}from"./index.module-BmTmeHGb.js";import{df as n,dV as b,dW as v,dZ as S,dX as f}from"./ui-vendor-DCtmHMLE.js";import"./providerIcon-C-5dBp3Z.js";import"./providerLetterIcon-B_5oy5OF.js";import"./markdown-vendor-DonjKQI4.js";function B({candidates:l,expanded:a,controlsId:r,searchActive:m,addingKey:t,visibilityKey:c,t:o,onToggle:p,onAdd:j,onHide:x}){return l.length===0?null:e.jsxs("div",{className:s.candidateModelSection,children:[e.jsxs("button",{type:"button",className:s.candidateSectionToggle,"aria-expanded":a,"aria-controls":r,disabled:m,onClick:p,children:[e.jsx(n,{size:14}),e.jsx("span",{className:s.candidateSectionTitle,children:o("modelSelector.availableToAdd")}),e.jsxs("span",{className:s.candidateSectionMeta,children:[l.length,a?e.jsx(b,{size:14}):e.jsx(v,{size:14})]})]}),a&&e.jsx("div",{id:r,className:s.candidateSectionBody,children:l.map(i=>{const d=u(i.provider.id,i.model.id);return e.jsxs("div",{className:s.candidateItem,children:[e.jsxs("div",{className:s.candidateIdentity,children:[e.jsx(h,{providerId:i.provider.id,size:16}),e.jsx("span",{title:i.model.name||i.model.id,children:i.model.name||i.model.id})]}),e.jsx("button",{type:"button",className:s.candidateSecondaryButton,"aria-label":o("modelSelector.hideModel"),disabled:c===d,onClick:()=>x(i),children:e.jsx(S,{size:14})}),e.jsxs("button",{type:"button",className:s.addCandidateButton,"aria-label":o("modelSelector.addAndUse"),disabled:t===d,onClick:()=>j(i),children:[t===d?e.jsx(f,{size:14,className:s.spinning}):e.jsx(n,{size:14}),o("modelSelector.addAndUse")]})]},d)})})]})}export{B as CandidateModelSection};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.