import{d,j as m,o as c,i as l,b as p,n as v,q as f,p as e,C as h}from"./index-BX34W763.js";import{w as y}from"./ScalarToggle.vue-DIBIgOSt.js";import{V,g as x,n as C}from"./ReferenceContentLoader-D7Cnl9bC.js";import{m as S}from"./RequestAuth.vue-C4vlKgTF.js";import"./__vite-browser-external-D7Ct-6yo.js";import"./DocumentMobileHeader.vue-CXp3gXuT.js";const b={class:"flex h-full w-full flex-col gap-12 px-1.5 pt-8"},k={class:"flex flex-col gap-4"},w={class:"flex flex-col gap-2"},g={class:"flex h-8 items-center justify-between"},A=d({__name:"CollectionAuthentication",setup(B){const{activeCollection:t,activeEnvVariables:i,activeEnvironment:s,activeServer:n,activeWorkspace:a}=V(),{collectionMutators:r}=x(),u=()=>{t.value?.uid&&r.edit(t.value.uid,"useCollectionSecurity",!t.value.useCollectionSecurity)};return(N,o)=>(c(),m("div",b,[l("div",k,[l("div",w,[l("div",g,[o[0]||(o[0]=l("h3",{class:"font-bold"},"Authentication",-1)),f(e(y),{class:"w-4",modelValue:e(t)?.useCollectionSecurity??!1,"onUpdate:modelValue":u},null,8,["modelValue"])]),o[1]||(o[1]=l("p",{class:"pr-6 text-sm"}," Added authentication will apply to all requests under this collection. You can override this by specifying another one in the request. ",-1))]),e(t)&&e(a)?(c(),p(e(S),{key:0,class:h(["scalar-collection-auth",!e(t)?.useCollectionSecurity&&"pointer-events-none opacity-50 mix-blend-luminosity"]),collection:e(t),envVariables:e(i),environment:e(s),layout:"client",selectedSecuritySchemeUids:e(t)?.selectedSecuritySchemeUids??[],server:e(n),title:"Authentication",workspace:e(a)},null,8,["class","collection","envVariables","environment","selectedSecuritySchemeUids","server","workspace"])):v("",!0)])]))}}),z=C(A,[["__scopeId","data-v-cc87292e"]]);export{z as default};
