import r, { css as e } from "styled-components";
import { getSpacing as i } from "../../../../utils/index.js";
const s = r.figure`
  height: ${({ imgHeight: t }) => t || "162px"};
  margin: ${i("s00")};
  overflow: hidden;
  position: relative;

  button {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
  }
`, a = r.img`
  width: 100%;
  height: 100%;

  ${({ asHeader: t }) => t && e`
      border-radius: ${({ theme: { radius: o } }) => `${o.roundedC} ${o.roundedC} ${o.roundedNone} ${o.roundedNone}`};
    `};

  ${({ objectFit: t }) => {
  switch (t) {
    case "contain":
      return e`
          object-fit: contain;
        `;
    case "fill":
      return e`
          object-fit: fill;
        `;
    case "none":
      return e`
          object-fit: none;
        `;
    case "scale-down":
      return e`
          object-fit: scale-down;
        `;
    default:
      return e`
          object-fit: cover;
        `;
  }
}};

  ${({ objectPosition: t }) => {
  switch (t) {
    case "bottom":
      return e`
          object-position: bottom;
        `;
    case "inherit":
      return e`
          object-position: inherit;
        `;
    case "initial":
      return e`
          object-position: initial;
        `;
    case "left":
      return e`
          object-position: left;
        `;
    case "revert":
      return e`
          object-position: revert;
        `;
    case "revert-layer":
      return e`
          object-position: revert-layer;
        `;
    case "right":
      return e`
          object-position: right;
        `;
    case "top":
      return e`
          object-position: top;
        `;
    case "unset":
      return e`
          object-position: unset;
        `;
    default:
      return e`
          object-position: center;
        `;
  }
}}
`;
export {
  s as ButtonSheetImageWrapper,
  a as ImageStyled
};
