import React from 'react'
import Layout from './Layout.jsx'
import {Head, Link} from '@inertiajs/inertia-react'

export default function Welcome({fair, message_flash}) {
    return (
        <Layout step={1} message_flash={message_flash}>
            <Head>
                <title>{_translations.welcome}</title>
            </Head>
            <img className="d-block mx-auto py-4 logo mb-5" src={fair.logo_url} alt={"Logo Feria"}/>
            <h1 className="fs-1 text-center my-3">{_translations.welcome_to} {fair.name}</h1>
            <div id="welcome_message" dangerouslySetInnerHTML={{__html: fair.description}} />
            <Link href={"/gallery_data?c=" + fair.code}>
                <button className="btn btn-50 mx-auto" type="button">{_translations.next}</button>
            </Link>
        </Layout>
    )
}
