'use strict';

var jsxRuntime = require('../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
var index = require('../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
var image_module = require('./image.module.css.cjs');

const image = index.cva(image_module.default.image, {
    variants: {
        fit: {
            contain: image_module.default["image-contain"],
            cover: image_module.default["image-cover"],
            fill: image_module.default["image-fill"],
        },
        radius: {
            none: image_module.default["image-radius-none"],
            small: image_module.default["image-radius-small"],
            medium: image_module.default["image-radius-medium"],
            full: image_module.default["image-radius-full"],
        }
    },
    defaultVariants: {
        fit: "cover",
        radius: "none"
    }
});
function Image({ alt = "", className, fit, radius, fallback, onError, width, height, style, loading = "lazy", decoding = "async", ...props }) {
    const handleError = (event) => {
        if (fallback) {
            event.currentTarget.src = fallback;
        }
        onError?.(event);
    };
    const imageStyle = {
        width: width,
        height: height,
        ...style
    };
    return (jsxRuntime.jsxRuntimeExports.jsx("img", { alt: alt, className: image({ fit, radius, className }), onError: handleError, style: imageStyle, loading: loading, decoding: decoding, ...props, role: "img", "aria-label": alt }));
}
Image.displayName = "Image";

exports.Image = Image;
//# sourceMappingURL=image.cjs.map
