1import{v as n,e as c}from"./index-CmrRmcEC.js";import{w as o,u as l}from"./useWorkspaceOverview-CQNNjtP4.js";import{u as f}from"./useMutation-CGBpR0QV.js";import{w as u}from"./queries-Cov6USjV.js";import{u as m}from"./ErrorModal-h5JlIK_6.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"[email protected]"};var r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="e1c18c6c-7d35-4fd6-9306-5c2bb47125f2",e._sentryDebugIdIdentifier="sentry-dbid-e1c18c6c-7d35-4fd6-9306-5c2bb47125f2")}catch{}})();const C=()=>{const{data:e,isLoading:r,error:a}=n({...o.getCompanyTypes});return{data:e,isLoading:r,error:a}},K=({enabled:e=!1,onSuccess:r})=>{const a=c(),{execute:i,uploading:d}=m({onSuccess:t=>{p({avatar_public_id:t})}}),{refetch:y}=n({enabled:e,queryKey:o.getWorkspaceAvatarUploadParameters.queryKey,queryFn:o.getWorkspaceAvatarUploadParameters.queryFn,staleTime:0}),{mutate:p}=f({mutationFn:l,onSuccess:()=>{r==null||r(),a.invalidateQueries({queryKey:u.getWorkspaces.queryKey}),a.invalidateQueries({queryKey:u.getCurrentWorkspace.queryKey}),a.invalidateQueries({queryKey:o.getWorkspaceOverview.queryKey})}});return{uploadImage:async({imageFile:t})=>{if(t)try{const{data:s}=await y();return s?await i(t,s):void 0}catch{throw new Error("Failed to upload workspace avatar")}},uploading:d}};export{K as a,C as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.