import{V as d,g as m,s as p}from"./ReferenceContentLoader-34zh6S1n.js";import{x as v}from"./ScalarToggle.vue-GokKqjks.js";import{f}from"./RequestAuth.vue-gPb2sM_u.js";import{d as h,c as y,o as c,a as l,b as x,j as V,e as S,u as e,k as C}from"./index-CDPBytck.js";import"./DocumentMobileHeader.vue-CtBquMK3.js";import"./__vite-browser-external-D7Ct-6yo.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"},g={class:"flex flex-col gap-2"},w={class:"flex h-8 items-center justify-between"},A=h({__name:"CollectionAuthentication",setup(B){const{activeCollection:t,activeEnvVariables:i,activeEnvironment:s,activeServer:n,activeWorkspace:a}=d(),{collectionMutators:r}=m(),u=()=>{t.value?.uid&&r.edit(t.value.uid,"useCollectionSecurity",!t.value.useCollectionSecurity)};return(N,o)=>(c(),y("div",b,[l("div",k,[l("div",g,[l("div",w,[o[0]||(o[0]=l("h3",{class:"font-bold"},"Authentication",-1)),S(e(v),{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(),x(e(f),{key:0,class:C(["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)])]))}}),I=p(A,[["__scopeId","data-v-cc87292e"]]);export{I as default};
