"use client";

import { Schibsted_Grotesk } from 'next/font/google'
import classnames from 'classnames';
import InlineLink from "../components/InlineLink";


const font = Schibsted_Grotesk({ subsets: ['latin'] })

interface LandingPageProps {
  children: React.ReactNode;
  imageUrl: string;
  headerText: string;
}

const LandingPage: React.FC<LandingPageProps> = ({ 
    children, 
    imageUrl,
    headerText
}) => {    
  return (
    <div className="relative w-full">
        <div className="absolute bottom-0 left-0 flex items-end w-full h-full">
                <div className="w-1/24 h-full flex justify-end">
                    <div className="w-[calc(50%+6px)] flex flex-col">
                        <div className={classnames(
                            "relative h-full border-l-6 rounded-out-br-4xl bg-bluetang border-atmosphere"
                        )} />
                        {/* <div className={classnames(
                            "h-9 rounded-bl-4xl border-b-6 border-l-6",
                            stripeColor, `border-${underlineBorder}`
                        )} /> */}
                    </div>
                </div>
                {/* <div className="w-11/12 flex justify-start">
                    <div className={classnames(
                        "w-full h-9 border-b-6 rounded-br-4xl",
                        stripeColor, `border-${underlineBorder}`
                    )} />
                </div> */}
        </div>
        <div className="w-full flex justify-start items-end pt-30">
            <div className="w-1/24 h-full flex justify-end">
                <div className="w-[calc(50%+6px)] flex flex-col justify-end z-1 bg-deepcove">
                    <div className={classnames(
                        "h-5 -mb-[3px] relative border-b-6 border-l-6 rounded-bl-3xl rounded-out-br-3xl bg-bluetang border-atmosphere"
                        )} />
                    <div className={classnames(
                        "h-5 -mt-[3px] relative border-t-6 border-l-6 rounded-tl-3xl rounded-out-tr-3xl bg-bluetang border-atmosphere"
                        )} />
                </div>
            </div>
            <div className={`w-11/12 flex flex-col justify-end mb-[14px]`}>
                <div className={classnames(
                    "text-5xl text-left ml-10 z-1 text-shadow-[1px_1px_0,-1px_1px_0,-1px_-1px_0,1px_-1px_0] text-shadow-deepcove text-bronze"
                )}>
                    {headerText}
                </div>
                <div className={classnames(
                    "w-full h-[6px] rounded-r bg-atmosphere"
                    )}>
                </div>
            </div>
        </div>
        <div className="w-full flex justify-center pb-30">
            <div className="w-11/12 z-1">
                    <div className="relative w-full flex justify-start pl-10 py-5">
                        <div className="absolute flex flex-col justify-center left-0 bottom-0 w-full h-full">
                            <div className={classnames("relative h-80 w-full rounded-r-2xl rounded-out-lt-3xl rounded-out-lb-3xl border-r-2 bg-bluetang border-atmosphere")} />
                        </div>
                        <div className={classnames("w-3/5 flex flex-col justify-center z-2")}>
                            <div className={classnames("text-4xl pb-8")}>
                                Quick Access to Your Services
                            </div>
                            <div className={classnames("text-2xl leading-12", font.className)}>
                                • <InlineLink>{headerText} Login/Registration</InlineLink><br />
                                • <InlineLink>Link to Thing 1</InlineLink><br />
                                • <InlineLink>Link to Thing 2</InlineLink><br />
                                • <InlineLink>Link to another Thing</InlineLink><br />
                            </div>
                        </div>
                        <div className={classnames("w-2/5 flex justify-center mr-10 rounded-2xl z-2 bg-atmosphere")}>
                            <div className={classnames(
                                "relative w-9/10"
                            )}>
                                <img src={imageUrl} alt="Description" className="grayscale rounded-2xl bg-cover bg-center" />
                                <div className="after:absolute after:inset-0 after:bg-bluetang after:mix-blend-color after:rounded-2xl" />
                            </div>
                        </div>
                    </div>
                    <div className={classnames("w-full text-2xl px-10", font.className)}>
                        {children}
                    </div>
            </div>
        </div>
    </div>
  );
};

export default LandingPage;