import{F as l,bg as m}from"./index-lOezWVmi.js";const o={instanceSummary:"instance-summary",profileSummary:"profile-summary",identityGroups:"identity-groups",createGroup:"create-groups",editGroup:"edit-groups",groupIdentities:"group-identities",createIdpGroup:"create-idp-groups",editIdpGroup:"edit-idp-groups",createTLSIdentity:"create-tls-identity",createStorageBucket:"create-bucket",editStorageBucket:"edit-bucket",createStorageBucketKey:"create-bucket-key",editStorageBucketKey:"edit-bucket-key",createClusterGroup:"create-cluster-group",editClusterGroups:"edit-cluster-group",editClusterMember:"edit-cluster-member"},y=()=>{const{project:u}=l(),[r,s]=m(),i=()=>{setTimeout(()=>window.dispatchEvent(new Event("resize")),100)},a=(e,t={})=>{const p=new URLSearchParams;r.get("filter")&&p.set("filter",r.get("filter")),p.set("panel",e);for(const[n,c]of Object.entries(t))c&&p.set(n,c);s(p),i()},d=()=>{const e=new URLSearchParams(r);e.delete("group"),e.delete("identity"),e.delete("idp-group"),e.delete("instance"),e.delete("member"),e.delete("panel"),e.delete("profile"),e.delete("panel-project"),e.delete("sub-form"),e.delete("bucket"),e.delete("bucket-key"),e.delete("panel-pool"),e.delete("target"),s(e),i()};return{panel:r.get("panel"),instance:r.get("instance"),profile:r.get("profile"),project:r.get("panel-project")??(u==null?void 0:u.name)??"default",identity:r.get("identity"),group:r.get("group"),idpGroup:r.get("idp-group"),member:r.get("member"),subForm:r.get("sub-form"),bucket:r.get("bucket"),key:r.get("bucket-key"),pool:r.get("panel-pool"),target:r.get("target")??"",clear:()=>{d()},openInstanceSummary:(e,t)=>{a(o.instanceSummary,{instance:e,"panel-project":t})},openProfileSummary:(e,t)=>{a(o.profileSummary,{profile:e,"panel-project":t})},openIdentityGroups:e=>{const t=new URLSearchParams(r);t.append("identity",e||""),a(o.identityGroups,Object.fromEntries(t))},openCreateGroup:e=>{const t={};e&&(t["sub-form"]=e),a(o.createGroup,t)},openEditGroup:(e,t)=>{const p={group:e||""};t&&(p["sub-form"]=t),a(o.editGroup,p)},openGroupIdentities:e=>{a(o.groupIdentities,{group:e||""})},openCreateIdpGroup:()=>{a(o.createIdpGroup)},openEditIdpGroup:e=>{a(o.editIdpGroup,{"idp-group":e||""})},openCreateTLSIdentity:()=>{a(o.createTLSIdentity)},openCreateStorageBucket:()=>{a(o.createStorageBucket)},openEditStorageBucket:(e,t,p)=>{const n={bucket:e||"","panel-pool":t||"",target:p||""};a(o.editStorageBucket,n)},openCreateClusterGroup:()=>{a(o.createClusterGroup)},openEditMember:e=>{a(o.editClusterMember,{member:e})},openEditClusterGroup:e=>{a(o.editClusterGroups,{group:e})},openCreateStorageBucketKey:()=>{a(o.createStorageBucketKey)},openEditStorageBucketKey:e=>{const t={"bucket-key":e||""};a(o.editStorageBucketKey,t)}}};export{o as p,y as u};
