!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ad86935a-52b7-5333-8b76-2c8b84a2e2f5")}catch(e){}}(); import{j as a,r as s}from"./chunk-LFPYN7LY-B-h9qMx-.js";import{t as o,c as n}from"./bundle-mjs-VoXYwsSu.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:"main"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bad7279d-7087-444a-a292-0a540e2f8108",e._sentryDebugIdIdentifier="sentry-dbid-bad7279d-7087-444a-a292-0a540e2f8108")}catch{}})();const f=({className:e})=>a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:o("animate-spin text-inherit",e),children:[a.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),a.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),h=()=>{const{loading:e,size:t}=s.useContext(l);return e?a.jsx("span",{className:"absolute inset-0 flex items-center justify-center",children:a.jsx(f,{className:t==="sm"||t==="md"?"h-5":"h-6"})}):null},w=n("flex items-center justify-center gap-x-2 text-base leading-5 font-medium",{variants:{loading:{true:"invisible"},size:{lg:"h-[calc(56px-1px*2)] px-5",md:"h-[calc(48px-1px*2)] px-4",sm:"h-[calc(36px-1px*2)] px-2"}},defaultVariants:{loading:!1,size:"lg"}}),b=({children:e,className:t})=>{const{loading:d,size:i}=s.useContext(l);return a.jsx("span",{className:o(w({loading:d,size:i}),t),children:e})},g="ButtonText";b.displayName=g;const N=n("relative inline-block rounded-2xl border transition disabled:cursor-not-allowed",{variants:{intent:{primary:"border-blue bg-blue text-white disabled:border-gray-100 disabled:bg-gray-100 disabled:text-gray-400",violet:"border-violet bg-violet text-white disabled:border-gray-100 disabled:bg-gray-100 disabled:text-gray-400",secondary:"border-blue-50 bg-blue-50 text-blue disabled:border-gray-100 disabled:bg-gray-100 disabled:text-gray-400",tertiary:"border-gray-200 bg-white text-gray-1000 disabled:border-gray-100 disabled:bg-gray-100 disabled:text-gray-400","tertiary-pretty":"border-blue-100 text-gray-1000 disabled:border-blueGray-50 disabled:bg-blueGray-50 disabled:text-blueGray-400",ghost:"border-transparent text-gray-1000 disabled:border-gray-100 disabled:bg-gray-100 disabled:text-gray-400",inverted:"border-white bg-white text-gray-1000 disabled:border-gray-100 disabled:bg-gray-100 disabled:text-gray-400",danger:"border-red bg-red text-white disabled:border-gray-100 disabled:bg-gray-100 disabled:text-gray-400"},loading:{true:"cursor-not-allowed"},size:{lg:"rounded-2xl",md:"rounded-xl",sm:"rounded-lg"}},compoundVariants:[{loading:!1,intent:"primary",className:"hover:border-blue-600 hover:bg-blue-600 active:border-blue-700 active:bg-blue-700"},{loading:!1,intent:"violet",className:"hover:border-violet-600 hover:bg-violet-600 active:border-violet-800 active:bg-violet-800"},{loading:!1,intent:"secondary",className:"hover:border-blue-100 hover:bg-blue-100 active:border-blue-200 active:bg-blue-200"},{loading:!1,intent:["tertiary","ghost","inverted"],className:"hover:border-gray-100 hover:bg-gray-100 active:border-gray-200 active:bg-gray-200"},{loading:!1,intent:"tertiary-pretty",className:"hover:border-blue-100 hover:bg-blue-100 active:border-blue-200 active:bg-blue-200"},{loading:!1,intent:"danger",className:"hover:border-red-600 hover:bg-red-600 active:border-red-700 active:bg-red-700"}],defaultVariants:{intent:"primary",loading:!1,size:"lg"}}),l=s.createContext({}),j=({intent:e,loading:t,disabled:d,size:i,type:c="button",children:r,className:u,onClick:y,...x},v)=>{const p=s.isValidElement(r)&&typeof r.type=="function"&&"displayName"in r.type&&r.type.displayName===g;return a.jsx(l.Provider,{value:{intent:e,loading:t,size:i},children:a.jsxs("button",{type:c,className:o(N({intent:e,loading:t,size:i}),u),...t?{onClick:m=>m.preventDefault()}:{onClick:y},...x,disabled:d,ref:v,children:[a.jsx(h,{}),p?r:a.jsx(b,{children:r})]})})},E=s.forwardRef(j);export{l as B,f as S,h as a,b,N as c,g as d,E as e}; //# debugId=ad86935a-52b7-5333-8b76-2c8b84a2e2f5