{"version":3,"file":"Image-Hor02ggk.js","sources":["../../../src/components/Image.tsx"],"sourcesContent":["import React from 'react';\nimport { css, styled } from 'styled-components';\nimport { breakpoints } from '../styled/utils';\nimport { BreakpointKey, Breakpoints } from '../types';\n\ninterface ImageProps {\n alt?: string,\n className?: string,\n display?: Breakpoints,\n height?: string,\n ratioHeight?: number,\n ratioWidth?: number,\n src: string,\n}\n\ninterface StyledImageProps{\n height?: string,\n $ratioHeight?: number,\n $ratioWidth?: number,\n $display?: Breakpoints,\n}\n\nconst StyledImage = styled.div`\n background-color: var(--color-iron-300);\n border-radius: var(--border-radius);\n height: ${props => props.height ? props.height : 'auto'};\n overflow: hidden;\n padding-bottom: calc((${props => (props.$ratioHeight && props.$ratioWidth) ? (props.$ratioHeight / props.$ratioWidth) : 1}) * 100%);\n position: relative;\n\n ${props => props.$display && Object.entries(props.$display).map(([size, value]) => css`\n @media ${breakpoints[size as BreakpointKey]} {\n display: ${value};\n }\n `)}\n\n > img {\n height: 100%;\n object-fit: cover;\n object-position: center;\n position: absolute;\n user-select: none;\n width: 100%;\n }\n`;\n\nexport default function Image({ alt, src, ratioHeight, ratioWidth, height, display }: ImageProps) {\n return (\n \n {alt}\n \n );\n}\n"],"names":["StyledImage","styled","div","withConfig","displayName","componentId","props","height","$ratioHeight","$ratioWidth","$display","Object","entries","map","size","value","css","breakpoints","Image","alt","src","ratioHeight","ratioWidth","display","jsx"],"mappings":"sYAsBA,MAAMA,EAAcC,EAAOC,IAAGC,WAAA,CAAAC,YAAA,qBAAAC,YAAA,cAAA,CAGlBC,EAAAA,CAAAA,oFAAAA,yCAAAA,+BAAAA,4GAAAA,EAAAA,GAASA,EAAMC,OAASD,EAAMC,OAAS,OAEfD,GAAAA,EAAME,cAAgBF,EAAMG,YAAgBH,EAAME,aAAeF,EAAMG,YAAe,EAG7GH,GAAAA,EAAMI,UAAYC,OAAOC,QAAQN,EAAMI,QAAQ,EAAEG,IAAI,CAAC,CAACC,EAAMC,CAAK,IAAMC;AAAAA,aACxEC,EAAYH,CAAqB,CAAC;AAAA,iBAC9BC,CAAK;AAAA;AAAA,GAEnB,CAAC,EAYJ,SAAwBG,EAAM,CAAEC,IAAAA,EAAKC,IAAAA,EAAKC,YAAAA,EAAaC,WAAAA,EAAYf,OAAAA,EAAQgB,QAAAA,CAAoB,EAAG,CAChG,OACGC,EAAA,IAAAxB,EAAA,CAAY,SAAUuB,EAAS,YAAaD,GAAc,GAAI,aAAcD,GAAe,EAAG,OAAAd,EAC7F,SAAAiB,EAAA,IAAC,MAAI,CAAA,IAAAJ,EAAU,IAAAD,CAAS,CAAA,EAC1B,CAEJ"}