"use client";
import Link from "next/link";import {X} from "lucide-react";import {useEffect,useState} from "react";
export function WelcomePopup(){const[open,setOpen]=useState(false);useEffect(()=>{if(!localStorage.getItem("moved-welcome-seen")&&!localStorage.getItem("nuvid-welcome-seen")){const timer=setTimeout(()=>setOpen(true),1400);return()=>clearTimeout(timer)}},[]);const close=()=>{localStorage.setItem("moved-welcome-seen","1");setOpen(false)};if(!open)return null;return <div className="welcome"><button onClick={close} aria-label="Close"><X size={17}/></button><p className="eyebrow">Welcome to moved</p><h2>Your first story starts free.</h2><p>Explore the complete creation preview and see your words become a visual sequence.</p><Link className="button button-primary" href="/app/create/" onClick={close}>Get free credits</Link></div>}
