import getPathPrefix from "../../../../utils/getPathPrefix";

function Flower({ className, onSelect, onMouseEnter, onMouseLeave }) {
    return (
        <svg
            width="1920"
            height="1080"
            viewBox="0 0 1920 1080"
            fill="none"
            xmlns="http://www.w3.org/2000/svg"
            xmlnsXlink="http://www.w3.org/1999/xlink"
            className={className}
        >
            <g id="flower">
                <rect
                    className="done"
                    width="1920"
                    height="1080"
                    fill="url(#pattern0_18_107)"
                />
                <rect
                    className="default"
                    width="1920"
                    height="1080"
                    fill="url(#pattern1_18_107)"
                />
                <rect
                    className="button"
                    x="460"
                    y="620"
                    width="230"
                    height="132"
                    fill="transparent"
                    onClick={onSelect}
                    onMouseEnter={onMouseEnter}
                    onMouseLeave={onMouseLeave}
                />
                <g
                    className="button"
                    onClick={onSelect}
                    onMouseEnter={onMouseEnter}
                    onMouseLeave={onMouseLeave}
                >
                    <path d="M661 442H891V574H661V442Z" fill="transparent" />
                    <path d="M821 514H960V620H821V514Z" fill="transparent" />
                </g>
            </g>
            <defs>
                <pattern
                    id="pattern0_18_107"
                    patternContentUnits="objectBoundingBox"
                    width="1"
                    height="1"
                >
                    <image
                        xlinkHref={`${getPathPrefix('/images/game/chapter3/flower-done.png')}`}
                        transform="scale(0.000520833 0.000925926)"
                    />
                </pattern>
                <pattern
                    id="pattern1_18_107"
                    patternContentUnits="objectBoundingBox"
                    width="1"
                    height="1"
                >
                    <image
                        xlinkHref={`${getPathPrefix('/images/game/chapter3/flower-default.png')}`}
                        transform="scale(0.000520833 0.000925926)"
                    />
                </pattern>
            </defs>
        </svg>
    );
}

export default Flower;
