1import{n as e}from"./chunk-Bh1tDfsg.js";import{n as t,t as n}from"./jsx-runtime-BVygFP0V.js";import{n as r,t as i}from"./createServerFn-CVXH69oG.js";import{t as a}from"./useServerFn-Dt9PCJ1j.js";import{t as o}from"./useMutation-bTKohgRK.js";import{t as s}from"./useQuery-BhIQ1pWC.js";import{P as c,w as l}from"./index-DUs4HmRn.js";import{t as u}from"./createLucideIcon-Z1Jfvdl8.js";import{n as d,t as f}from"./search-Bz9xlXRB.js";import{t as p}from"./badge-check-zZYvoLwm.js";import{t as m}from"./circle-check-B0k203Z9.js";import{t as h}from"./clock-Dq7Udjbd.js";import{t as g}from"./shield-check-CodnG92q.js";import{t as _}from"./smartphone-BOv0BiN-.js";import{t as v}from"./wrench-gZiTgOAC.js";import{t as y}from"./button-zbM9G815.js";import{t as b}from"./input-T9Jq4zb7.js";import{n as x,t as S}from"./textarea-ZY9C1Evx.js";import{i as C,n as w,r as T,t as E}from"./accordion-DV5ksL3t.js";var D=u(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),O=u(`wallet`,[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`,key:`18etb6`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`,key:`xoc0q4`}]]),k=e(t()),A=i({method:`GET`}).handler(r(`665a8dc3dc441b45b2f639aeda1492ece3fd6078343e6ee764309d1cb1c23ce3`)),j=i({method:`POST`}).handler(r(`af3ab60fdc1b13a84a47ff840de14f25edb865eed9d31c7fbb069db02c29b300`)),M=n(),N=[{key:`64`,label:`64 Go`,factor:.86},{key:`128`,label:`128 Go`,factor:.92},{key:`256`,label:`256 Go`,factor:1},{key:`512`,label:`512 Go`,factor:1.08},{key:`1024`,label:`1 To`,factor:1.14}],P=[{key:`excellent`,fr:`Comme neuf`,en:`Like new`,factor:1,descFr:`Aucune égratignure, batterie saine`,descEn:`No scratches, healthy battery`},{key:`good`,fr:`Bon état`,en:`Good`,factor:.85,descFr:`Micro-rayures, tout fonctionne`,descEn:`Micro-scratches, everything works`},{key:`used`,fr:`Usé`,en:`Worn`,factor:.68,descFr:`Rayures visibles, batterie faible`,descEn:`Visible scratches, weak battery`},{key:`cracked`,fr:`Ãcran fissuré`,en:`Cracked screen`,factor:.5,descFr:`Vitre ou dos brisé`,descEn:`Cracked glass front or back`},{key:`dead`,fr:`Ne s'allume pas`,en:`Won't turn on`,factor:.28,descFr:`En panne, dégât d'eau`,descEn:`Dead, water damage`}];function F(){let{locale:e}=l.useParams(),t=e===`fr`,n=a(A),r=a(j),[i,u]=(0,k.useState)(``),[F,I]=(0,k.useState)(null),[L,R]=(0,k.useState)(N[2]),[z,B]=(0,k.useState)(P[1]),[V,H]=(0,k.useState)({name:``,phone:``,email:``,notes:``}),[U,W]=(0,k.useState)(!1),{data:G=[],isLoading:K}=s({queryKey:[`tradein-values`],queryFn:()=>n(),staleTime:300*1e3}),q=(0,k.useMemo)(()=>{let e=i.trim().toLowerCase();return e?G.filter(t=>`${t.brandName} ${t.modelName}`.toLowerCase().includes(e)):G},[i,G]),J=F?Math.max(10,Math.round(F.maxPriceCad*L.factor*z.factor/5)*5):null,Y=o({mutationFn:async()=>{F&&await r({data:{customerName:V.name,customerPhone:V.phone,customerEmail:V.email,brandName:F.brandName,modelName:F.modelName,capacity:L.label,condition:t?z.fr:z.en,estimatedOfferCad:J??void 0,notes:V.notes||void 0}})},onSuccess:()=>W(!0)}),X=[{icon:f,title:t?`1. Choisissez votre modèle`:`1. Pick your model`,body:t?`Le prix maximal s'affiche immédiatement, même pour un appareil brisé.`:`The maximum price shows instantly, even for a broken device.`},{icon:p,title:t?`2. Décrivez l'état`:`2. Describe the condition`,body:t?`Capacité et état : votre offre estimée s'affiche en 30 secondes.`:`Capacity and condition: your estimated offer appears in 30 seconds.`},{icon:O,title:t?`3. Encaissez`:`3. Get paid`,body:t?`Vérification en boutique, puis paiement comptant ou virement Interac.`:`In-store verification, then cash or Interac payment.`}],Z=[{icon:v,title:t?`Un vrai atelier`:`A real workshop`,body:t?`Nous réparons nous-mêmes ce que nous rachetons, à Saint-Léonard. C'est pourquoi nous prenons même les appareils brisés.`:`We repair what we buy back, right in Saint-Léonard. That's why we take broken devices too.`},{icon:g,title:t?`Le prix affiché est le prix payé`:`The shown price is the paid price`,body:t?`Grille claire par c
1apacité et par état. Aucune négociation surprise après vérification.`:`Clear grid by capacity and condition. No surprise haggling after inspection.`},{icon:D,title:t?`Vos données effacées`:`Your data erased`,body:t?`Chaque appareil est réinitialisé et effacé de façon sécuritaire avant sa seconde vie.`:`Every device is reset and securely wiped before its second life.`},{icon:h,title:t?`Ouvert 24 h`:`Open 24 hours`,body:t?`Passez au moment qui vous convient : nous évaluons votre appareil sur place, gratuitement.`:`Drop by whenever suits you: we evaluate your device on site, for free.`}],Q=t?[{q:`Rachetez-vous les téléphones brisés ?`,a:`Oui. Ãcran fissuré, dos cassé, batterie morte ou appareil qui ne s'allume plus : nous faisons une offre selon l'état.`},{q:`Comment suis-je payé ?`,a:`Comptant ou virement Interac, immédiatement après la vérification de l'appareil en boutique.`},{q:`Que dois-je apporter ?`,a:`L'appareil, déconnecté de votre compte iCloud ou Google, et une pièce d'identité.`},{q:`L'offre est-elle garantie ?`,a:`L'offre en ligne est une estimation. Elle est confirmée après une vérification rapide de l'écran, de la batterie et du fonctionnement.`}]:[{q:`Do you buy broken phones?`,a:`Yes. Cracked screen, broken back, dead battery or a device that won't turn on: we make an offer based on the condition.`},{q:`How am I paid?`,a:`Cash or Interac transfer, right after we verify the device in store.`},{q:`What should I bring?`,a:`The device, signed out of your iCloud or Google account, plus a piece of ID.`},{q:`Is the offer guaranteed?`,a:`The online offer is an estimate. It is confirmed after a quick check of the screen, battery and functions.`}];return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`section`,{className:`bg-primary/5`,children:(0,M.jsx)(`div`,{className:`mx-auto max-w-6xl px-4 py-12 sm:py-16`,children:(0,M.jsxs)(`div`,{className:`grid gap-8 lg:grid-cols-2 lg:items-center`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`span`,{className:`inline-flex items-center gap-2 rounded-full bg-primary/10 px-3 py-1 text-xs font-semibold text-primary`,children:[(0,M.jsx)(_,{className:`h-3.5 w-3.5`}),t?`Rachat d'appareils`:`Device buyback`]}),(0,M.jsx)(`h1`,{className:`mt-3 text-3xl font-bold tracking-tight sm:text-4xl`,children:t?`Vendez votre téléphone au meilleur prix`:`Sell your phone at the best price`}),(0,M.jsx)(`p`,{className:`mt-3 text-muted-foreground`,children:t?`Nous rachetons iPhone, Samsung et Pixel â même fissurés, même en panne. Offre en 30 secondes, paiement comptant ou Interac à Saint-Léonard, Montréal.`:`We buy iPhone, Samsung and Pixel â even cracked, even dead. Offer in 30 seconds, cash or Interac payment in Saint-Léonard, Montreal.`}),(0,M.jsx)(`ul`,{className:`mt-5 space-y-2 text-sm`,children:[t?`Estimation gratuite, sans compte`:`Free estimate, no account needed`,t?`Nous prenons aussi les appareils brisés`:`We take broken devices too`,t?`Données effacées de façon sécuritaire`:`Data securely erased`,t?`Paiement comptant ou virement Interac`:`Cash or Interac payment`].map(e=>(0,M.jsxs)(`li`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(m,{className:`h-4 w-4 shrink-0 text-primary`}),e]},e))}),(0,M.jsxs)(`div`,{className:`mt-6 flex flex-wrap gap-3`,children:[(0,M.jsx)(y,{asChild:!0,size:`lg`,children:(0,M.jsxs)(`a`,{href:`#estimer`,children:[t?`Estimer mon appareil`:`Estimate my device`,` `,(0,M.jsx)(d,{className:`ml-2 h-4 w-4`})]})}),(0,M.jsx)(y,{asChild:!0,size:`lg`,variant:`outline`,children:(0,M.jsx)(`a`,{href:`tel:${c.phoneRaw}`,children:c.phone})})]})]}),(0,M.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:X.map(e=>(0,M.jsxs)(`div`,{className:`rounded-2xl border border-border bg-card p-5`,children:[(0,M.jsx)(e.icon,{className:`h-7 w-7 text-primary`,strokeWidth:1.5}),(0,M.jsx)(`div`,{className:`mt-3 text-sm font-bold`,children:e.title}),(0,M.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:e.body})]},e.title))})]})})}),(0,M.jsxs)(`section`,{id:`estimer`,className:`mx-auto max-w-6xl scroll-mt-20 px-4 py-12`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-bold tracking-tight sm:text-3xl`,children:t?`Quel appareil vendez-vous ?`:`Which device are you selling?`}),(0,M.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:t?`Cliquez sur votre modèle : le prix s'affiche selon la capacité et l'état, même s'il est brisé.`:`Click your model: the price appears based on capacity and condition, even if it's broken.`}),(0,M.jsxs)(`div`,{className:`mt-5 flex items-center gap-2 rounded-xl border border-border bg-card px-3 py-2 shadow-sm focus-within:border-primary`,children:[(0,M.jsx)(f,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,M.jsx)(`input`,{value:i,onChange:e=>u(e.target.value),placeholder:t?`Cherchez votre modèle (ex. iPhone 14 Pro)`:`Search your model (e.g. iPhone 14 Pro)`,"aria-label":t?`Rechercher un modèle`:`Search a model`,className:`w-full bg-transparent text-sm outline-none`})]}),K?(0,M.jsx)(`p`,{className:`mt-6 text-sm text-muted-foreground`,children:t?`Chargementâ¦`:`Loadingâ¦`}):(0,M.jsxs)(`div`,{className:`mt-5 grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4`,children:[q.map(e=>(0,M.jsxs)(`button`,{type:`button`,onClick:()=>{I(e),W(!1)},className:`flex items-center gap-3 rounded-xl border p-3 text-left transition hover:border-primary hover:shadow-md ${F?.modelId===e.modelId?`border-primary bg-primary/5 shadow-md`:`border-border bg-card`}`,children:[e.imageUrl?(0,M.jsx)(`img`,{src:e.imageUrl,alt:`${e.brandName} ${e.modelName}`,loading:`lazy`,className:`h-12 w-9 shrink-0 rounded object-contain`}):(0,M.jsx)(_,{className:`h-8 w-8 shrink-0 text-muted-foreground`,strokeWidth:1.5}),(0,M.jsxs)(`span`,{className:`min-w-0`,children:[(0,M.jsx)(`span`,{className:`block truncate text-sm font-semibold`,children:e.modelName}),(0,M.jsxs)(`span`,{className:`block text-xs text-primary`,children:[t?`jusqu'à `:`up to`,` `,Math.round(e.maxPriceCad*1.14),` $`]}),(0,M.jsx)(`span`,{className:`block text-[11px] text-muted-foreground`,children:t?`même brisé`:`even broken`})]})]},e.modelId)),q.length===0&&(0,M.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:t?`Aucun modèle ne correspond. Contactez-nous pour une offre sur demande.`:`No model matches. Contact us for an offer on request.`})]}),F&&(0,M.jsxs)(`div`,{className:`mt-8 grid gap-6 rounded-2xl border border-border bg-card p-5 lg:grid-cols-2 lg:p-7`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(`div`,{className:`text-sm font-semibold text-muted-foreground`,children:F.brandName}),(0,M.jsx)(`div`,{className:`text-xl font-bold`,children:F.modelName}),(0,M.jsxs)(`div`,{className:`mt-5`,children:[(0,M.jsx)(`div`,{className:`text-sm font-semibold`,children:t?`Capacité`:`Storage`}),(0,M.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:N.map(e=>(0,M.jsx)(`button`,{type:`button`,onClick:()=>R(e),className:`rounded-lg border px-3 py-1.5 text-sm transition ${L.key===e.key?`border-primary bg-primary/10 font-semibold text-primary`:`border-border hover:border-primary`}`,children:e.label},e.key))})]}),(0,M.jsxs)(`div`,{className:`mt-5`,children:[(0,M.jsx)(`div`,{className:`text-sm font-semibold`,children:t?`Ãtat de l'appareil`:`Device condition`}),(0,M.jsx)(`div`,{className:`mt-2 grid gap-2 sm:grid-cols-2`,children:P.map(e=>(0,M.jsxs)(`button`,{type:`button`,onClick:()=>B(e),className:`rounded-lg border p-2.5 text-left transition ${z.key===e.key?`border-primary bg-primary/10`:`border-border hover:border-primary`}`,children:[(0,M.jsx)(`span`,{className:`block text-sm font-semibold`,children:t?e.fr:e.en}),(0,M.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:t?e.descFr:e.descEn})]},e.key))})]}),(0,M.jsxs)(`div`,{className:`mt-6 rounded-xl bg-primary/10 p-4 text-center`,children:[(0,M.jsx)(`div`,{className:`text-xs font-semibold uppercase tracking-wide text-primary`,children:t?`Offre estimée`:`Estimated offer`}),(0,M.jsxs)(`div`,{className:`mt-1 text-4xl font-bold text-primary`,children:[J,` $`]}),(0,M.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:t?`Confirmée après vérification en boutique (écran, batterie, fonctions).`:`Confirmed after in-store verification (screen, battery, functions).`})]})]}),(0,M.jsx)(`div`,{children:U?(0,M.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center rounded-xl border border-primary/40 bg-primary/5 p-6 text-center`,children:[(0,M.jsx)(m,{className:`h-10 w-10 text-primary`}),(0,M.jsx)(`p`,{className:`mt-3 font-semibold`,children:t?`Demande envoyée !`:`Request sent!`}),(0,M.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:t?`Nous vous contactons rapidement pour confirmer l'offre et fixer le passage en boutique.`:`We'll contact you shortly to confirm the offer and arrange your store visit.`})]}):(0,M.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),Y.mutate()},className:`space-y-3`,children:[(0,M.jsx)(`div`,{className:`text-sm font-semibold`,children:t?`Recevez votre offre ferme`:`Get your firm offer`}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(x,{htmlFor:`ti-name`,children:t?`Nom complet`:`Full name`}
1),(0,M.jsx)(b,{id:`ti-name`,required:!0,value:V.name,onChange:e=>H({...V,name:e.target.value})})]}),(0,M.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,M.jsxs)(`div`,{children:[(0,M.jsx)(x,{htmlFor:`ti-phone`,children:t?`Téléphone`:`Phone`}),(0,M.jsx)(b,{id:`ti-phone`,required:!0,value:V.phone,onChange:e=>H({...V,phone:e.target.value})})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(x,{htmlFor:`ti-email`,children:t?`Courriel`:`Email`}),(0,M.jsx)(b,{id:`ti-email`,type:`email`,required:!0,value:V.email,onChange:e=>H({...V,email:e.target.value})})]})]}),(0,M.jsxs)(`div`,{children:[(0,M.jsx)(x,{htmlFor:`ti-notes`,children:t?`Détails (optionnel)`:`Details (optional)`}),(0,M.jsx)(S,{id:`ti-notes`,rows:3,placeholder:t?`Batterie remplacée, dos fissuré, accessoires inclusâ¦`:`Battery replaced, cracked back, accessories includedâ¦`,value:V.notes,onChange:e=>H({...V,notes:e.target.value})})]}),(0,M.jsx)(y,{type:`submit`,size:`lg`,className:`w-full`,disabled:Y.isPending,children:Y.isPending?t?`Envoiâ¦`:`Sendingâ¦`:t?`Envoyer ma demande de rachat`:`Send my buyback request`}),Y.isError&&(0,M.jsx)(`p`,{className:`text-sm text-destructive`,children:t?`Une erreur est survenue. Réessayez ou appelez-nous.`:`Something went wrong. Try again or call us.`}),(0,M.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:t?`Aucun engagement : vous validez l'offre en boutique avant le paiement.`:`No commitment: you confirm the offer in store before payment.`})]})})]})]}),(0,M.jsx)(`section`,{className:`border-y border-border/60 bg-muted/30`,children:(0,M.jsxs)(`div`,{className:`mx-auto max-w-6xl px-4 py-12`,children:[(0,M.jsx)(`h2`,{className:`text-center text-2xl font-bold tracking-tight sm:text-3xl`,children:t?`Pourquoi vendre chez iRepairPhoneX ?`:`Why sell to iRepairPhoneX?`}),(0,M.jsx)(`div`,{className:`mt-8 grid gap-4 sm:grid-cols-2 lg:grid-cols-4`,children:Z.map(e=>(0,M.jsxs)(`div`,{className:`rounded-2xl border border-border bg-card p-5`,children:[(0,M.jsx)(e.icon,{className:`h-7 w-7 text-primary`,strokeWidth:1.5}),(0,M.jsx)(`div`,{className:`mt-3 font-bold`,children:e.title}),(0,M.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:e.body})]},e.title))})]})}),(0,M.jsxs)(`section`,{className:`mx-auto max-w-3xl px-4 py-12`,children:[(0,M.jsx)(`h2`,{className:`text-2xl font-bold tracking-tight sm:text-3xl`,children:t?`Questions sur le rachat`:`Buyback questions`}),(0,M.jsx)(E,{type:`single`,collapsible:!0,className:`mt-6`,children:Q.map((e,t)=>(0,M.jsxs)(T,{value:String(t),children:[(0,M.jsx)(C,{children:e.q}),(0,M.jsx)(w,{children:e.a})]},t))})]})]})}export{F as component};
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.