import{F as p,j as h,ad as x,E as b}from"./ReferenceContentLoader-jQeEHBuo.js";import"./navigation-BK47qCFk.js";import{w}from"./ScalarToggle.vue-BsLILHDc.js";import{d as y,c as S,o as r,b as l,y as V,a as k,f as C,u as e}from"./index-D86EVCbM.js";import"./__vite-browser-external-D7Ct-6yo.js";const g={class:"flex h-full w-full flex-col gap-12 px-1.5 pt-8"},A={class:"flex flex-col gap-4"},E={class:"bg-b-1 flex items-center justify-between gap-4 text-sm"},B=y({__name:"CollectionAuthentication",setup(U){const{activeCollection:t,activeEnvVariables:u,activeEnvironment:d,activeServer:m,activeWorkspace:c}=p(),{collectionMutators:v}=h(),f=()=>{var o;(o=t.value)!=null&&o.uid&&v.edit(t.value.uid,"useCollectionSecurity",!t.value.useCollectionSecurity)};return(o,a)=>{var s,n,i;return r(),S("div",g,[l("div",A,[a[1]||(a[1]=l("div",{class:"flex h-8 items-center"},[l("h3",{class:"font-bold"},"Authenticate with the API once")],-1)),l("div",E,[a[0]||(a[0]=l("p",{class:"text-c-2 flex flex-1 text-balance"}," Don’t want to set up the authentication for each request? Enable this option to set the authentication once for the whole collection. ",-1)),C(e(w),{class:"w-4",modelValue:((s=e(t))==null?void 0:s.useCollectionSecurity)??!1,"onUpdate:modelValue":f},null,8,["modelValue"])]),(n=e(t))!=null&&n.useCollectionSecurity&&e(c)?(r(),V(e(x),{key:0,class:"scalar-collection-auth",collection:e(t),envVariables:e(u),environment:e(d),layout:"reference",selectedSecuritySchemeUids:((i=e(t))==null?void 0:i.selectedSecuritySchemeUids)??[],server:e(m),title:"Authentication",workspace:e(c)},null,8,["collection","envVariables","environment","selectedSecuritySchemeUids","server","workspace"])):k("",!0)])])}}}),q=b(B,[["__scopeId","data-v-909b9799"]]);export{q as default};
