"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
    if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
    return cooked;
};
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImageTile = void 0;
var react_1 = __importDefault(require("react"));
var styled_components_1 = __importDefault(require("styled-components"));
var classnames_1 = require("../utils/classnames");
var styleguide_1 = require("../utils/styleguide");
exports.ImageTile = function (_a) {
    var src = _a.src, alt = _a.alt, children = _a.children, className = _a.className, props = __rest(_a, ["src", "alt", "children", "className"]);
    return (react_1.default.createElement(TileButton, __assign({}, props, { className: classnames_1.cn('lwc-image-tile lwc-tile', className) }),
        react_1.default.createElement(TileImage, { className: "lwc-tile-image", src: src, alt: alt }),
        children));
};
var TileButton = styled_components_1.default.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n  display: block;\n  padding: 0;\n  border: 0 none;\n  background: none;\n\n  border-radius: 4px;\n  box-shadow: 0 2px 8px -2px rgb(45 55 72 / 25%);\n\n  &:hover {\n    cursor: pointer;\n  }\n\n  @media (prefers-reduced-motion: no-preference) {\n    transition: all .1s ease-out;\n\n    &:hover {\n      transform: scale(1.12);\n    }\n  }\n\n  @media (hover: none), (hover: on-demand) {\n    &:hover {\n      transform: unset;\n    }\n  }\n\n  .lwc-selected & {\n    box-shadow:\n      0 0 0 4px #38b2ac,\n      0 2px 8px 2px rgb(45 55 72 / 25%);\n  }\n"], ["\n  display: block;\n  padding: 0;\n  border: 0 none;\n  background: none;\n\n  border-radius: 4px;\n  box-shadow: 0 2px 8px -2px rgb(45 55 72 / 25%);\n\n  &:hover {\n    cursor: pointer;\n  }\n\n  @media (prefers-reduced-motion: no-preference) {\n    transition: all .1s ease-out;\n\n    &:hover {\n      transform: scale(1.12);\n    }\n  }\n\n  @media (hover: none), (hover: on-demand) {\n    &:hover {\n      transform: unset;\n    }\n  }\n\n  .lwc-selected & {\n    box-shadow:\n      0 0 0 4px #38b2ac,\n      0 2px 8px 2px rgb(45 55 72 / 25%);\n  }\n"])));
var TileImage = styled_components_1.default.img(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n  height: 128px;\n  border-radius: 4px;\n  vertical-align: top;\n\n  @media ", " {\n    height: 144px;\n  }\n\n  @media ", " {\n    height: 176px;\n  }\n\n  @media ", " {\n    height: 200px;\n  }\n"], ["\n  height: 128px;\n  border-radius: 4px;\n  vertical-align: top;\n\n  @media ", " {\n    height: 144px;\n  }\n\n  @media ", " {\n    height: 176px;\n  }\n\n  @media ", " {\n    height: 200px;\n  }\n"])), styleguide_1.device._600, styleguide_1.device._900, styleguide_1.device._1024);
var templateObject_1, templateObject_2;
