1import{h as E,g as A,r as f,aA as F,j as e,D as q,b as B,d as M,e as W,i as j,o as b,w as z,p as w,q as v,l as g,k as t,B as m,A as S,a3 as U,n as L,T as G}from"./index-Bj3g7Z6n.js";import{u as H}from"./index.esm-YV04pLcZ.js";import{L as R}from"./label-ZAJAkNWx.js";import{T as $}from"./textarea-DpDzU_cc.js";import{u as I}from"./useDealSuggestions-DTAdyiGN.js";import{T as K}from"./trending-down-i_bLKbZ1.js";import{T as k}from"./target-BAyTQkEE.js";import{S as O}from"./SEOMetaTags-CXUV2KLP.js";function J({open:c,onClose:s,keyword:o}){const r=E(),{user:d}=A();f.useEffect(()=>{if(c){F({particleCount:100,spread:70,origin:{y:.6}});const u=setTimeout(()=>{s()},3e4);return()=>clearTimeout(u)}},[c,s]);const x=()=>{r(d?"/profile?tab=notifications":"/join?redirect=/profile?tab=notifications"),s()},N=()=>{r(d?"/profile?tab=price-drops":"/join?redirect=/profile?tab=price-drops"),s()},i=()=>{r("/join"),s()};return e.jsx(q,{open:c,onOpenChange:s,children:e.jsxs(B,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[e.jsxs(M,{children:[e.jsx(W,{className:"text-2xl md:text-3xl text-center",children:"ð Got it! We're on the hunt!"}),e.jsxs("p",{className:"text-center text-muted-foreground pt-2",children:["We'll scour the web for ",e.jsxs("strong",{children:['"',o,'"']})," deals and post them to our site and Facebook group."]})]}),e.jsxs("div",{className:"space-y-4 pt-4",children:[e.jsx("h3",{className:"text-lg font-semibold text-center mb-6",children:"Want to be first to know? Here's how..."}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[e.jsxs(j,{className:"cursor-pointer hover:shadow-lg transition-all hover:scale-105 border-2 hover:border-primary",onClick:x,children:[e.jsxs(b,{className:"text-center pb-3",children:[e.jsx("div",{className:"mx-auto w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center mb-3",children:e.jsx(z,{className:"w-6 h-6 text-primary"})}),e.jsx(w,{className:"text-lg",children:"Never Miss This Deal"}),e.jsxs(v,{children:['Save "',o,'" as a tracked keyword']})]}),e.jsxs(g,{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-center",children:"Get instant notifications when deals match your keywords"}),e.jsxs("div",{className:"flex flex-wrap gap-2 justify-center",children:[e.jsx(t,{variant:"secondary",className:"text-xs",children:"Instant alerts"}),e.jsx(t,{variant:"secondary",className:"text-xs",children:"Unlimited"}),e.jsx(t,{variant:"secondary",className:"text-xs",children:"Free forever"})]}),e.jsxs(m,{className:"w-full",size:"sm",children:["Set Up Alert ",e.jsx(S,{className:"w-4 h-4 ml-2"})]})]})]}),e.jsxs(j,{className:"cursor-pointer hover:shadow-lg transition-all hover:scale-105 border-2 hover:border-primary",onClick:N,children:[e.jsxs(b,{className:"text-center pb-3",children:[e.jsx("div",{className:"mx-auto w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center mb-3",children:e.jsx(K,{className:"w-6 h-6 text-primary"})}),e.jsx(w,{className:"text-lg",children:"Track Prices"}),e.jsx(v,{children:"Get notified on price drops"})]}),e.jsxs(g,{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-center",children:"Automatically monitor prices and get alerts when they drop"}),e.jsxs("div",{className:"flex flex-wrap gap-2 justify-center",children:[e.jsx(t,{variant:"secondary",className:"text-xs",children:"Track 25 deals"}),e.jsx(t,{variant:"secondary",className:"text-xs",children:"Smart alerts"}),e.jsx(t,{variant:"secondary",className:"text-xs",children:"Auto-check"})]}),e.jsxs(m,{variant:"outline",className:"w-full",size:"sm",children:["Learn More ",e.jsx(S,{className:"w-4 h-4 ml-2"})]})]})]}),e.jsxs(j,{className:"cursor-pointer hover:shadow-lg transition-all hover:scale-105 border-2 hover:border-primary",onClick:i,children:[e.jsxs(b,{className:"text-center pb-3",children:[e.jsx("div",{className:"mx-auto w-12 h-12 rounded-full bg-primary/10 flex items-center justify-center mb-3",children:e.jsx(k,{className:"w-6 h-6 text-primary"})}),e.jsx(w,{className:"text-lg",children:"Join Extreme Bargains"}),e.jsx(v,{children:"Access personalized features"})]}),e.jsxs(g,{className:"space-y-3",children:[e.jsx("p",{className:"text-sm text-center",children:"Personalized feeds, wishlists, budget tracking & rewards"}),e.jsxs("div",{className:"flex flex-wrap gap-2 justify-center",children:[e.jsx(t,{variant:"secondary",className:"text-xs",children:"Budget tools"}),e.jsx(t,{variant:"secondary",className:"text-xs",children:"Earn points"}),e.jsx(t,{variant:"secondary",className:"text-xs",children:"Community"})]}),e.jsxs(m,{variant:"outline",className:"w-full",size:"sm",children:["Sign Up Free ",e.jsx(S,{className:"w-4 h-4 ml-2"})]})]})]})]}),e.jsx("div",{className:"text-center pt-4",children:e.jsx(m,{variant:"ghost",onClick:s,size:"sm",children:"Skip for Now"})})]})]})})}function re(){const[c,s]=f.useState(!1),[o,r]=f.useState(0),[d,x]=f.useState(!1),N=I(),{toast:i}=U(),{register:u,handleSubmit:T,reset:C,formState:{errors:y}}=H(),P=async h=>{if(h.honeypot)return;const n=h.products.split(` 2`).map(l=>l.trim()).filter(l=>l.length>0);if(n.length===0){i({title:"No products entered",description:"Please enter at least one product name",variant:"destructive"});return}if(n.length>20){i({title:"Too many products",description:"Please enter a maximum of 20 products at a time",variant:"destructive"});return}x(!0);let a=0;for(const l of n)try{await new Promise((p,Y)=>{N.mutate({keyword:l,urgency:"anytime"},{onSuccess:()=>{a++,p()},onError:D=>{console.error(`Failed to submit ${l}:`,D),p()}})})}catch(p){console.error("Submission error:",p)}x(!1),r(a),a>0?(s(!0),C(),i({title:"Suggestions submitted!",description:`Successfully submitted ${a} product request${a>
21?"s":""}`})):i({title:"Submission failed",description:"Please try again later",variant:"destructive"})};return e.jsxs(e.Fragment,{children:[e.jsx(O,{title:"Request Deals | Extreme Bargains - Tell Us What You're Looking For",description:"Can't find a deal? Submit a request and our community will hunt it down. Free deal finder for UK shoppers.",keywords:"deal request, find deals, bargain hunter, UK deals wanted"}),e.jsx("div",{className:"min-h-screen bg-background",children:e.jsxs("main",{className:"container mx-auto px-4 py-12 max-w-3xl",children:[e.jsxs("div",{className:"text-center mb-8 space-y-4",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 mb-4",children:e.jsx(k,{className:"w-8 h-8 text-primary"})}),e.jsx("h1",{className:"text-3xl md:text-4xl font-bold",children:"What Deals Are You Looking For?"}),e.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"Enter the products you're hunting for, one per line. We'll track them down and post when we find great deals!"}),e.jsxs("div",{className:"flex flex-wrap gap-4 justify-center pt-2",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(L,{className:"w-4 h-4 text-primary"}),e.jsx("span",{children:"No account needed"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[e.jsx(G,{className:"w-4 h-4 text-primary"}),e.jsx("span",{children:"Helps our community"})]})]})]}),e.jsx(j,{children:e.jsx(g,{className:"pt-6",children:e.jsxs("form",{onSubmit:T(P),className:"space-y-6",children:[e.jsx("input",{type:"text",...u("honeypot"),className:"hidden",tabIndex:-1,autoComplete:"off"}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(R,{htmlFor:"products",className:"text-base",children:["What products are you looking for? ",e.jsx("span",{className:"text-destructive",children:"*"})]}),e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Enter one product per line (max 20)"}),e.jsx($,{id:"products",placeholder:`iPhone 16 Pro 3Samsung Galaxy S25 4Samsung 65" TV 5PS5 Pro 6Nintendo Switch 2 7Meta Quest 3`,rows:10,...u("products",{required:"Please enter at least one product",validate:h=>{const n=h.split(` 8`).filter(a=>a.trim().length>0);return n.length===0?"Please enter at least one product":n.length>20?"Maximum 20 products at a time":!0}}),className:y.products?"border-destructive font-mono":"font-mono"}),y.products&&e.jsx("p",{className:"text-sm text-destructive",children:y.products.message}),e.jsx("p",{className:"text-xs text-muted-foreground",children:'ð¡ Tip: Be specific! "Nintendo Switch OLED" is better than just "Switch"'})]}),e.jsx(m,{type:"submit",size:"lg",className:"w-full",disabled:d,children:d?"Submitting...":"Submit Requests"}),e.jsx("p",{className:"text-xs text-center text-muted-foreground",children:"By submitting, you help our community discover better deals. We may post deals based on your requests publicly."})]})})})]})}),e.jsx(J,{open:c,onClose:()=>s(!1),keyword:o>1?`${o} products`:"your request"})]})}
8export{re as default};
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.