// Lalaluxe booking — booking/screens/visit.jsx
// Page: "visit" — one appointment, a new three-visit plan, or a visit on a plan already bought.
// The three ways in are all on the screen: someone already on a plan should never have to
// tap "buy a plan" to find where to continue it.
// One screen per file. Load before app.jsx (see docs/architecture.md, "The no-build multi-file Babel contract").
function VisitStep({ cfg, s, sq, onPick, onSubMode, onPriceCheck }) {
	return (
		<div className="screen">
			<ScreenHead cfg={cfg} screen="visit">
				Make Time for <em>Your Set</em>
			</ScreenHead>

			<div className="body">
				<div className="tile-stack">
					<button
						className={"tile " + (s.visit === "appointment" && !s.priceCheck ? "sel" : "")}
						aria-pressed={s.visit === "appointment" && !s.priceCheck}
						onClick={() => onPick("appointment")}
					>
						<span className="tile-art"><VisitIcon count={1} /></span>
						<span className="tile-copy">
							<span className="title">One Appointment</span>
							<span className="desc">Nails, toes, or both.</span>
						</span>
						<Ico name="next" className="tile-go" />
					</button>

					<button
						className={"tile " + (s.visit === "subscription" && s.subMode === "new" ? "sel" : "")}
						aria-pressed={s.visit === "subscription" && s.subMode === "new"}
						onClick={() => onSubMode("new")}
					>
						<span className="tile-art"><VisitIcon count={3} /></span>
						<span className="tile-copy">
							<span className="title">3-Visit Plan</span>
							<span className="desc">
								Three sets.{cfg.afterpay !== false && sq?.afterpay === true && <> Pay in 4 with <Afterpay /> when available at checkout.</>}
							</span>
						</span>
						<Ico name="next" className="tile-go" />
					</button>
				</div>

				{cfg.priceCheck === true && (
					<button className="plan-code plan-code--photo" onClick={onPriceCheck}>
						<span>
							<b>Have an Inspo Photo?</b>
							Upload it for an instant price check.
						</span>
						<Ico name="arrow" />
					</button>
				)}
			</div>
		</div>
	);
}
