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

function Giraffe({ 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="giraffe">
                <rect
                    className="default"
                    x="0.5"
                    y="0.5"
                    width="1919"
                    height="1079"
                    fill="url(#pattern0_9_36)"
                    stroke="black"
                />
                <rect
                    className="button"
                    x="265"
                    y="213"
                    width="287"
                    height="667"
                    fill="transparent"
                    onClick={onSelect}
                    onMouseEnter={onMouseEnter}
                    onMouseLeave={onMouseLeave}
                />
            </g>
            <defs>
                <pattern
                    id="pattern0_9_36"
                    patternContentUnits="objectBoundingBox"
                    width="1"
                    height="1"
                >
                    <image
                        xlinkHref={`${getPathPrefix('/images/game/chapter2/giraffe-default.png')}`}
                        transform="scale(0.000520833 0.000925926)"
                    />
                </pattern>
            </defs>
        </svg>
    );
}

export default Giraffe;
