@getontime/cli
Version:
Time keeping for live events
3 lines (2 loc) • 3.01 kB
JavaScript
import{j as s,by as j,bz as x,bA as P,bB as w,bC as v,bD as D,bE as C,aR as k,aS as S,bF as E,bG as I,bd as N,bH as f,bI as R,e as u,k as T,N as F,O as A}from"./vendor-DFNUfA2K.js";import{i as d,aA as h,aw as O,aR as y,aD as $}from"./index-BNit4nUw.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="06045d7f-de1d-47e6-9356-7223a2404d6d",e._sentryDebugIdIdentifier="sentry-dbid-06045d7f-de1d-47e6-9356-7223a2404d6d")}catch{}})();const q="_blink_10e6s_1",Q="_fourtyfive_10e6s_13",M="_medium_10e6s_43",z="_large_10e6s_51",H="_thumb_10e6s_59",l={blink:q,fourtyfive:Q,switch:"_switch_10e6s_17",medium:M,large:z,thumb:H};function oe({size:e="medium",...t}){return s.jsx(j,{className:d([l.switch,l[e]]),...t,children:s.jsx(x,{className:l.thumb})})}const U="_popup_1xpg9_17",B="_title_1xpg9_34",_={popup:U,title:B};function G({title:e,className:t,children:o,...n}){return s.jsx(P,{children:s.jsx(w,{sideOffset:8,...n,children:s.jsxs(v,{className:_.popup,children:[e&&s.jsx(D,{className:_.title,children:e}),s.jsx(C,{className:t,render:s.jsx("div",{}),children:o})]})})})}const J="_input_jz3ye_17",K={input:J};function b({color:e,onChange:t,children:o}){return s.jsxs(k,{children:[s.jsx(S,{children:o}),s.jsxs(G,{children:[s.jsx(E,{color:e,onChange:t}),s.jsx(I,{color:e,onChange:t,className:K.input,prefixed:!0})]})]})}const L="_list_1tpdr_17",V="_swatch_1tpdr_23",W="_selected_1tpdr_33",X="_selectable_1tpdr_36",i={list:L,swatch:V,selected:W,selectable:X};function ne(e){const{color:t,onChange:o,isSelected:n,alwaysDisplayColor:a}=e,r=N(g=>{o(g)},100),c=a||n?t:"",{color:m}=h(c);return s.jsx(b,{color:c,onChange:r,children:s.jsx("div",{className:d([i.swatch,n&&i.selected,i.selectable]),style:{backgroundColor:c},children:s.jsx(f,{color:m})})})}function ae(e){const{name:t,control:o}=e,{field:{onChange:n,value:a}}=R({control:o,name:t}),r=typeof a=="string"?a:"",{color:c}=h(r);return s.jsx(b,{color:a,onChange:n,children:s.jsx("div",{className:d([i.swatch,i.selectable]),style:{backgroundColor:r},children:s.jsx(f,{color:c})})})}const p=`${O}/project`;async function Y(){return(await u.get(p)).data}async function Z(e){return u.post(p,e)}async function re(e){const t=new FormData;return t.append("image",e),await u.post(`${p}/upload`,t,{headers:{"Content-Type":"multipart/form-data"}})}const ee={title:"",description:"",url:"",info:"",logo:null,custom:[]};function ce(){const{data:e,status:t,isFetching:o,isError:n,refetch:a}=T({queryKey:y,queryFn:Y,placeholderData:(r,c)=>r,refetchInterval:$});return{data:e??ee,status:t,isFetching:o,isError:n,refetch:a}}function ie(){const e=F(),t=A({mutationFn:Z,onSuccess:o=>{e.setQueryData(y,o)}});return{updateProjectData:t.mutateAsync,isMutating:t.isPending,isMutatingError:t.isError}}export{G as P,oe as S,ie as a,re as b,ae as c,ne as d,i as s,ce as u};
//# sourceMappingURL=useProjectData-BfKJevmX.js.map