import{r as e}from"./chunk-DECur_0Z.js";import{a as t}from"./auth-store-CeX2QaQI.js";import{t as n}from"./react-CO2uhaBc.js";import{Cf as r,L as i,q as a}from"./messages-CA0k74Lg.js";import{n as o}from"./Match-CBdZnJ7h.js";import{i as s}from"./button-CfqkRSM8.js";import{t as c}from"./createLucideIcon-Br0Bd5k2.js";import{n as l,t as u}from"./theme-switch-KnQlFw6B.js";import{h as d}from"./checkout-model-BfGeSuFW.js";var f=c(`message-circle`,[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}]]),p=e(n()),m=r();function h({className:e,...t}){return(0,m.jsxs)(`svg`,{className:s(`[&>path]:stroke-current`,e),fill:`none`,height:`24`,role:`img`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,viewBox:`0 0 24 24`,width:`24`,xmlns:`http://www.w3.org/2000/svg`,...t,children:[(0,m.jsx)(`title`,{children:`GitHub`}),(0,m.jsx)(`path`,{d:`M0 0h24v24H0z`,fill:`none`,strokeWidth:`0`}),(0,m.jsx)(`path`,{d:`M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5`})]})}function g(){let e=t.useQuery(`get`,`/payments/gmpay/v1/config`,void 0,{retry:!1}),n=(0,p.useMemo)(()=>d(e.data),[e.data])?.site,r=n?.cashier_name||`GM Pay`,s=n?.logo_url||`/images/logo.png`,c=n?.website_title||r,g=n?.support_link,_=n?.background_color?.trim(),v=n?.background_image_url?.trim(),y=(0,p.useMemo)(()=>({..._&&!v?{backgroundColor:_}:{},...v&&_?{backgroundAttachment:`fixed`,backgroundImage:`linear-gradient(${_}, ${_}), url(${JSON.stringify(v)})`,backgroundPosition:`center, center`,backgroundRepeat:`no-repeat, no-repeat`,backgroundSize:`cover, cover`}:{},...v&&!_?{backgroundAttachment:`fixed`,backgroundImage:`url(${JSON.stringify(v)})`,backgroundPosition:`center`,backgroundRepeat:`no-repeat`,backgroundSize:`cover`}:{}}),[_,v]);return(0,p.useEffect)(()=>{document.title=c},[c]),(0,m.jsx)(`div`,{className:`min-h-svh bg-background text-foreground`,style:y,children:(0,m.jsxs)(`div`,{className:`mx-auto flex min-h-svh w-full max-w-sm flex-col px-5`,children:[(0,m.jsxs)(`header`,{className:`flex items-center justify-between pt-8 pb-6`,children:[(0,m.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,m.jsx)(`img`,{alt:r,className:`size-8 rounded-sm shadow-sm`,height:32,src:s,width:32}),(0,m.jsx)(`span`,{className:`font-semibold text-card-foreground text-lg tracking-tight`,children:r})]}),(0,m.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,m.jsx)(l,{}),(0,m.jsx)(u,{})]})]}),(0,m.jsx)(o,{}),g?(0,m.jsxs)(`a`,{"aria-label":a(),className:`fixed right-5 bottom-5 z-20 flex h-12 items-center gap-2 rounded-full bg-primary px-4 font-medium text-primary-foreground text-sm shadow-lg transition hover:opacity-90`,href:g,rel:`noopener noreferrer`,target:`_blank`,children:[(0,m.jsx)(f,{className:`size-4`}),(0,m.jsx)(`span`,{children:a()})]}):null,(0,m.jsxs)(`footer`,{className:`flex flex-wrap items-center justify-center gap-2.5 py-6 text-muted-foreground text-xs`,children:[(0,m.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[i(),(0,m.jsxs)(`a`,{className:`flex items-center gap-1 font-semibold text-card-foreground hover:opacity-70`,href:`https://www.gmwallet.app`,rel:`noopener noreferrer`,target:`_blank`,children:[(0,m.jsx)(`img`,{alt:``,className:`size-3.5 rounded-xs`,height:14,src:`/images/logo.png`,width:14}),`GM Wallet`]})]}),(0,m.jsx)(`span`,{className:`opacity-30`,children:`|`}),(0,m.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[`Open source on`,(0,m.jsxs)(`a`,{className:`flex items-center gap-1 font-semibold text-card-foreground hover:opacity-70`,href:`https://github.com/GMwalletApp`,rel:`noopener noreferrer`,target:`_blank`,children:[(0,m.jsx)(h,{className:`size-3.5`}),`GitHub`]})]})]})]})})}export{g as component};