import"./navigation-BzNQiq4W.js";import{w as f}from"./ScalarToggle.vue-DCof8PDJ.js";import{z as h,j as y,af as x,v as S}from"./ReferenceContentLoader-Z8YmHBVJ.js";import{d as b,i as w,o as r,h as l,b as C,k as V,n as k,l as e,y as A}from"./index-DPl1iiyq.js";import"./__vite-browser-external-D7Ct-6yo.js";const U={class:"flex h-full w-full flex-col gap-12 px-1.5 pt-8"},g={class:"flex flex-col gap-4"},j={class:"flex flex-col gap-2"},B={class:"flex h-8 items-center justify-between"},E=b({__name:"CollectionAuthentication",setup(_){const{activeCollection:t,activeEnvVariables:u,activeEnvironment:d,activeServer:v,activeWorkspace:i}=h(),{collectionMutators:m}=y(),p=()=>{var a;(a=t.value)!=null&&a.uid&&m.edit(t.value.uid,"useCollectionSecurity",!t.value.useCollectionSecurity)};return(a,o)=>{var c,s,n;return r(),w("div",U,[l("div",g,[l("div",j,[l("div",B,[o[0]||(o[0]=l("h3",{class:"font-bold"},"Authentication",-1)),k(e(f),{class:"w-4",modelValue:((c=e(t))==null?void 0:c.useCollectionSecurity)??!1,"onUpdate:modelValue":p},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(i)?(r(),C(e(x),{key:0,class:A(["scalar-collection-auth",!((s=e(t))!=null&&s.useCollectionSecurity)&&"pointer-events-none opacity-50 mix-blend-luminosity"]),collection:e(t),envVariables:e(u),environment:e(d),layout:"client",selectedSecuritySchemeUids:((n=e(t))==null?void 0:n.selectedSecuritySchemeUids)??[],server:e(v),title:"Authentication",workspace:e(i)},null,8,["class","collection","envVariables","environment","selectedSecuritySchemeUids","server","workspace"])):V("",!0)])])}}}),W=S(E,[["__scopeId","data-v-cc87292e"]]);export{W as default};
