// Interest only: save responses in GHL without enrollment, payment, or scoring.
function TeacherTraining() {
  const [status, setStatus] = React.useState("idle");
  const submittingRef = React.useRef(false);
  const resultRef = React.useRef(null);
  React.useEffect(() => {
    if (["#teacher-training", "#interest"].includes(window.location.hash)) document.getElementById(window.location.hash.slice(1)).scrollIntoView();
  }, []);
  React.useEffect(() => {
    if ((status === "sent" || status === "error") && resultRef.current) {
      resultRef.current.focus({ preventScroll: true });
      resultRef.current.scrollIntoView({ behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth", block: "center" });
    }
  }, [status]);
  const submitInterest = async event => {
    event.preventDefault();
    if (submittingRef.current || !event.currentTarget.reportValidity()) return;
    const values = Object.fromEntries(new FormData(event.currentTarget));
    values.contact_consent = values.contact_consent === "on";
    submittingRef.current = true;
    setStatus("sending");
    try {
      const response = await fetch("/api/teacher-training", {
        method: "POST",
        headers: { "Content-Type": "application/json" },
        body: JSON.stringify(values),
      });
      const result = await response.json();
      if (!response.ok || !result.ok) throw new Error("Submission failed");
      setStatus("sent");
    } catch (error) {
      setStatus("error");
    } finally {
      submittingRef.current = false;
    }
  };
  return (<section id="teacher-training" className="tt-program" aria-labelledby="training-title">
  <section className="tt-wrap tt-hero" aria-labelledby="training-title">
    <div>
      <div className="eyebrow">American Mahjong · Instructor Training</div>
      <h1 id="training-title">The Mahj Clubs<br />Instructor Training Program</h1>
      <p className="tt-tagline">Share the game. Teach with confidence.</p>
      <p className="intro">Turn your love of American mahjong into the skills to teach it. Our teacher training program brings together instructional materials, hands-on live training, and support throughout your teaching journey.</p>
      <p>Choose your teaching path: join The Mahj Clubs&rsquo; teaching team or teach independently as a TMC-Certified Instructor using our curriculum and licensed materials.</p>
      <div className="price-line"><span className="price">$495</span><span className="price-note">Instructor training program<br />Materials, live training &amp; teaching support</span></div>
      <a className="tt-button" href="/instructor-training#interest" onClick={event => { event.preventDefault(); history.replaceState(null, "", "/instructor-training#interest"); document.getElementById("interest").scrollIntoView({ behavior: window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "auto" : "smooth" }); }}>I&rsquo;m interested in teaching</a>
    </div>
    <figure className="tt-photo"><img src="/assets/imagery/lessons-hero.jpg" alt="Mahjong lessons at The Mahj Clubs" fetchpriority="high" /><figcaption>your next chapter at the table</figcaption></figure>
  </section>

  <section className="includes tt-section" aria-labelledby="included-title"><div className="tt-wrap">
    <div className="eyebrow">Your $495 program</div><h2 id="included-title">What&rsquo;s included</h2>
    <p className="section-lede">A minimum of 10 hours of training, divided among classroom sessions, shadowing classes, and a wrap-up session. Instructors are welcome to shadow additional classes and events as needed to build their confidence and teaching skills.</p>
    <div className="benefits">
      <article className="benefit"><span className="num">01 / MATERIALS</span><h3>A curriculum you can teach from</h3><p>A ten-module beginner teaching outline, instructor workbook, Charleston and rules references, practice activities, and observation and readiness checklists.</p></article>
      <article className="benefit"><span className="num">02 / LIVE TRAINING</span><h3>Hands-on practice and feedback</h3><p>Practice explaining the rules, demonstrating with tiles, leading the Charleston, and guiding a first game. Teach a mini-lesson and receive feedback on your clarity, pacing, and coaching.</p></article>
      <article className="benefit"><span className="num">03 / ONGOING SUPPORT</span><h3>Guidance as you begin teaching</h3><p>Support with teaching questions, common beginner challenges, and your development as an instructor, including guided observation or co-teaching and a follow-up debrief.</p></article>
      <article className="benefit"><span className="num">04 / LICENSED USE</span><h3>Materials for your teaching journey</h3><p>Use TMC&rsquo;s training curriculum and instructional materials to teach at the club or in your own business under a TMC teaching-materials license.</p></article>
      <article className="benefit"><span className="num">05 / YOUR OWN BUSINESS</span><h3>Access to highly discounted tiles</h3><p>Choose to teach independently and get access to highly discounted tiles to help you get started. Tile purchases are optional.</p></article>
      <article className="benefit"><span className="num">06 / TEACHING WITH TMC</span><h3>Weekly teaching and club membership</h3><p>Teachers who stay with The Mahj Clubs receive guaranteed teaching opportunities every week, plus an instructor membership to the club.</p></article>
    </div>
    <p className="license-note tt-small">The program includes licensed use of TMC teaching materials, subject to the program&rsquo;s license agreement. We&rsquo;ll share the training schedule, support details, and full license terms before enrollment opens.</p>
  </div></section>

  <section className="tt-wrap tt-section curriculum-layout" aria-labelledby="curriculum-title">
    <div><div className="eyebrow">From player to teacher</div><h2 id="curriculum-title">Learn how to teach<br />the whole first lesson.</h2><p>Our approach is simple: explain, demonstrate, let students practice, and check understanding. You&rsquo;ll learn to coach with questions, correct mistakes kindly, and help students make their own decisions.</p></div>
    <ol className="curriculum"><li>Introduction, history, and the goal of the game</li><li>Tile recognition and terminology</li><li>Reading the current NMJL card</li><li>Jokers, calls, and exposures</li><li>Walls, dealing, and table setup</li><li>Evaluating a starting hand</li><li>Leading the Charleston</li><li>Guiding the first practice game</li><li>Coaching independent play</li><li>Checking readiness and planning next steps</li></ol>
  </section>

  <section className="path-section tt-section" aria-labelledby="paths-title"><div className="tt-wrap">
    <div className="eyebrow">Where will you teach?</div><h2 id="paths-title">Choose your teaching path.</h2><p>Participants must choose one teaching path before they begin teaching. If you have not decided yet, select &ldquo;Unknown at this time&rdquo; on your application. We&rsquo;ll help you explore the options during training.</p>
    <div className="paths"><article><h3>Teach with The Mahj Clubs</h3><p>Graduates who join TMC&rsquo;s teaching team receive <strong>guaranteed weekly teaching opportunities and an instructor membership to the club</strong>, along with ongoing teaching support.</p><p>Before teaching for TMC, you must sign an instructor contract. <strong>TMC instructors may not teach outside of the club unless approved by TMC.</strong></p></article><article><h3>Teach independently as a TMC-Certified Instructor</h3><p>Upon graduation, you may teach independently as a <strong>TMC-Certified Instructor</strong>, with a license to use our instructional materials. <strong>You must follow TMC&rsquo;s curriculum in your classes.</strong></p><p>You&rsquo;ll receive ongoing teaching support and access to optional, highly discounted tiles. Tile purchases are separate from the program fee.</p><p>If you teach in a different geographical area from a TMC location, <strong>The Mahj Clubs will market your classes and teaching services</strong> to help connect you with local students.</p></article></div>
    <p className="readiness">Training includes a practice mini-lesson and observed table facilitation. We&rsquo;ll provide feedback on rules accuracy and teaching readiness, with coaching on any areas that need more practice.</p>
  </div></section>

  <section id="interest" className="tt-wrap tt-section form-layout" aria-labelledby="interest-title">
    <div className="form-intro"><div className="eyebrow">Tell us about yourself</div><h2 id="interest-title">Interested in teaching?</h2><p>Tell us how you learned American mahjong, how long you&rsquo;ve been playing, and where you&rsquo;d like to teach. The five-question rules check helps us understand your starting point.</p><p>This is an interest form, not enrollment. There&rsquo;s no payment or commitment to join.</p><div className="faq"><h3>Do I need teaching experience?</h3><p>We&rsquo;d love to hear from players who enjoy helping others learn. Share any teaching or coaching experience you have, even outside mahjong.</p><h3>Can I decide my teaching path later?</h3><p>Yes. Select &ldquo;Unknown at this time&rdquo; on your application. You must choose one teaching path before you begin teaching; the requirements for each path are explained above.</p><h3>When is the training?</h3><p>Dates and the live training schedule will be shared before enrollment opens.</p></div></div>
    <form id="training-interest-form" onSubmit={submitInterest} onChange={() => { if (!submittingRef.current) setStatus("idle"); }} className="interest-form" action="/api/teacher-training" method="post" aria-describedby="interest-note" aria-busy={status === "sending"}>
      <div className="tt-honeypot" aria-hidden="true"><label>Leave this field blank<input name="website" tabIndex={-1} autoComplete="off" /></label></div>
      <fieldset><legend>About you</legend><div className="field-grid">
        <label className="field" htmlFor="full-name"><span>Full name *</span><input id="full-name" name="full_name" autoComplete="name" maxLength="120" required /></label>
        <label className="field" htmlFor="email"><span>Email address *</span><input id="email" name="email" type="email" autoComplete="email" maxLength="200" required /></label>
        <label className="field" htmlFor="phone"><span>Phone <span className="optional">(optional)</span></span><input id="phone" name="phone" type="tel" autoComplete="tel" maxLength="40" /></label>
        <label className="field" htmlFor="location"><span>City and state *</span><input id="location" name="location" autoComplete="address-level2" maxLength="160" required /></label>
      </div></fieldset>
      <fieldset><legend>Your mahjong experience</legend>
        <label className="field" htmlFor="learned"><span>How did you learn American mahjong? *</span><textarea id="learned" name="learned" maxLength="1500" placeholder="For example: lessons with an instructor, friends or family, a club, online classes, or self-taught. Please include where or with whom you learned." required></textarea></label>
        <label className="field" htmlFor="playing"><span>How long have you been playing American mahjong? *</span><select id="playing" name="playing" required><option value="">Choose an answer</option><option>Less than 6 months</option><option>6–12 months</option><option>1–2 years</option><option>3–5 years</option><option>More than 5 years</option></select></label>
        <label className="field" htmlFor="frequency"><span>How often do you currently play? <span className="optional">(optional)</span></span><select id="frequency" name="frequency"><option value="">Choose an answer</option><option>Several times a week</option><option>About once a week</option><option>A few times a month</option><option>Occasionally</option></select></label>
        <label className="field" htmlFor="goal"><span>Choose your teaching path *</span><select id="goal" name="teaching_goal" aria-describedby="teaching-path-note" required><option value="">Choose an answer</option><option value="At The Mahj Clubs">Teach with The Mahj Clubs</option><option value="In my own teaching business">Teach independently as a TMC-Certified Instructor</option><option>Unknown at this time</option></select></label>
        <p className="quiz-intro" id="teaching-path-note">You may select &ldquo;Unknown at this time&rdquo; while exploring the program, but you must choose one path before teaching. TMC team instructors must sign a contract and may teach outside the club only with TMC approval. Independent TMC-Certified Instructors must follow TMC&rsquo;s curriculum.</p>
        <label className="field" htmlFor="experience"><span>Tell us why you want to teach, and about any teaching or coaching experience. <span className="optional">(optional)</span></span><textarea id="experience" name="teaching_experience" maxLength="1500"></textarea></label>
      </fieldset>
      <fieldset><legend>A quick rules check</legend><p className="quiz-intro">Use standard American mahjong rules with the NMJL card. Choose the best answer for each question. It&rsquo;s okay to select &ldquo;I&rsquo;m not sure.&rdquo;</p>
        <fieldset className="question"><legend>1. Where may a joker be used? *</legend><label className="quiz-option"><input type="radio" name="quiz_1" value="A" required /><span>In any single, pair, or group</span></label><label className="quiz-option"><input type="radio" name="quiz_1" value="B" required /><span>In permitted groups of three or more identical tiles, but not singles or pairs</span></label><label className="quiz-option"><input type="radio" name="quiz_1" value="C" required /><span>Only in pairs</span></label><label className="quiz-option"><input type="radio" name="quiz_1" value="D" required /><span>I&rsquo;m not sure</span></label></fieldset>
        <fieldset className="question"><legend>2. You need a discarded tile to complete a pair. When may you call it? *</legend><label className="quiz-option"><input type="radio" name="quiz_2" value="A" required /><span>Whenever the pair matches my chosen hand</span></label><label className="quiz-option"><input type="radio" name="quiz_2" value="B" required /><span>Only if I already have an exposure</span></label><label className="quiz-option"><input type="radio" name="quiz_2" value="C" required /><span>Only when that tile completes my legal mahjong hand</span></label><label className="quiz-option"><input type="radio" name="quiz_2" value="D" required /><span>I&rsquo;m not sure</span></label></fieldset>
        <fieldset className="question"><legend>3. What is the passing order in the first Charleston? *</legend><label className="quiz-option"><input type="radio" name="quiz_3" value="A" required /><span>Right, across, left</span></label><label className="quiz-option"><input type="radio" name="quiz_3" value="B" required /><span>Left, across, right</span></label><label className="quiz-option"><input type="radio" name="quiz_3" value="C" required /><span>Right, left, across</span></label><label className="quiz-option"><input type="radio" name="quiz_3" value="D" required /><span>I&rsquo;m not sure</span></label></fieldset>
        <fieldset className="question"><legend>4. You are playing a concealed hand marked &ldquo;C&rdquo; on the card. May you call a discard to expose a pung before you are ready to declare mahjong? *</legend><label className="quiz-option"><input type="radio" name="quiz_4" value="A" required /><span>Yes, if the pung contains no jokers</span></label><label className="quiz-option"><input type="radio" name="quiz_4" value="B" required /><span>No; the hand must remain concealed until mahjong</span></label><label className="quiz-option"><input type="radio" name="quiz_4" value="C" required /><span>Yes, but only once per game</span></label><label className="quiz-option"><input type="radio" name="quiz_4" value="D" required /><span>I&rsquo;m not sure</span></label></fieldset>
        <fieldset className="question"><legend>5. After the deal, how many tiles does East (the dealer) have, and how many does each other player have? *</legend><label className="quiz-option"><input type="radio" name="quiz_5" value="A" required /><span>13 for everyone</span></label><label className="quiz-option"><input type="radio" name="quiz_5" value="B" required /><span>14 for everyone</span></label><label className="quiz-option"><input type="radio" name="quiz_5" value="C" required /><span>East has 14; each other player has 13</span></label><label className="quiz-option"><input type="radio" name="quiz_5" value="D" required /><span>I&rsquo;m not sure</span></label></fieldset>
      </fieldset>
      <label className="field" htmlFor="questions"><span>Questions or scheduling preferences? <span className="optional">(optional)</span></span><textarea id="questions" name="questions" maxLength="1500"></textarea></label>
      <label className="consent"><input type="checkbox" id="consent" name="contact_consent" required /><span>I&rsquo;d like The Mahj Clubs to contact me about teacher training. I understand this is an interest form, not enrollment or a purchase. <a href="/privacy">Privacy policy</a></span></label>
      <button className="tt-button" type="submit" id="submit-interest" disabled={status === "sending" || status === "sent"}>{status === "sending" ? "Sending…" : status === "sent" ? "Interest submitted" : "Submit interest"}</button>
      <p className="form-preview-note" id="interest-note">Required fields are marked *. Submitting this form does not enroll you in the program or charge you.</p>
      
      <div id="interest-result" className="result" role={status === "error" ? "alert" : "status"} tabIndex="-1" hidden={status !== "sent" && status !== "error"} ref={resultRef}>{status === "sent" ? <React.Fragment><h3>Thank you for your interest!</h3><p>The Mahj Clubs will be in touch about training dates and next steps. You have not enrolled or been charged.</p></React.Fragment> : <React.Fragment><h3>We couldn&rsquo;t confirm your submission.</h3><p>Your answers are still here. Please try again, or contact <a href="mailto:hello@themahjclubs.com">hello@themahjclubs.com</a> for help.</p></React.Fragment>}</div>
    </form>
  </section>
  <p className="fine-print">This is a The Mahj Clubs instructor-development program, not a National Mah Jongg League certification or endorsement. Teaching follows the current NMJL card and official rules. The TMC materials license covers TMC materials, not third-party materials.</p>

  </section>);
}
function InstructorTrainingPage({ go, page }) {
  return <main style={{ fontFamily: "var(--font-body)", color: "var(--text-body)" }}>
    <TmcNav go={go} page={page} />
    <TeacherTraining />
    <InstagramFeed />
    <TmcFooter go={go} />
  </main>;
}

function InstructorTrainingTeaser({ go }) {
  return <section id="teacher-training" className="tt-teaser" aria-labelledby="instructor-teaser-title">
    <div className="tt-teaser-inner">
      <div>
        <div className="eyebrow">Mahjong Instructor Training</div>
        <h2 id="instructor-teaser-title">Share the game.<br />Teach with confidence.</h2>
        <p>Our $495 program includes instructional materials, at least 10 hours of training across classroom sessions, shadowing classes, and a wrap-up session, plus ongoing teaching support. Instructors are welcome to shadow additional classes and events as needed. Choose to teach with TMC or independently as a TMC-Certified Instructor. TMC team instructors receive guaranteed weekly teaching opportunities and an instructor membership, and must sign a contract requiring TMC approval to teach outside the club. Independent instructors must follow TMC&rsquo;s curriculum; we market their classes when they teach in a different geographical area from a TMC location.</p><p>Not sure which path fits? Select &ldquo;Unknown at this time&rdquo; when you apply.</p>
      </div>
      <a className="tt-button" href="/instructor-training" onClick={event => { event.preventDefault(); go("instructor-training"); }}>Explore Instructor Training</a>
    </div>
  </section>;
}
Object.assign(window, { TeacherTraining, InstructorTrainingPage, InstructorTrainingTeaser });


