{"version":3,"file":"gifView.mjs","names":[],"sources":["../../../../../../package/common/klipyPicker/components/gifView/gifView.tsx"],"sourcesContent":["import { useState } from 'react';\nimport cx from 'classnames';\nimport type { ReactElement } from 'react';\nimport type { GifViewProps } from './gifView.types';\nimport styles from './gifView.module.pcss';\n\nexport default function GifView({ className, src = '' }: GifViewProps): ReactElement {\n  const [loadedSrc, setLoadedSrc] = useState<string | null>(null);\n  const isLoading = loadedSrc !== src;\n\n  return (\n    <div className={cx(styles.gifView, className)}>\n      <img className={styles.klipyPickerSelected} src={src} onLoad={() => setLoadedSrc(src)} />\n      {isLoading && <div className={styles.gifViewLoading} />}\n    </div>\n  );\n}\n"],"mappings":"8JAMA,SAAwB,EAAQ,CAAE,YAAW,MAAM,IAAkC,CACnF,GAAM,CAAC,EAAW,GAAgB,EAAwB,IAAI,EACxD,EAAY,IAAc,EAEhC,OACE,EAAC,MAAD,CAAK,UAAW,EAAG,EAAO,QAAS,CAAS,EAA5C,SAAA,CACE,EAAC,MAAD,CAAK,UAAW,EAAO,oBAA0B,MAAK,WAAc,EAAa,CAAG,CAAI,CAAA,EACvF,GAAa,EAAC,MAAD,CAAK,UAAW,EAAO,cAAiB,CAAA,CACnD,GAET"}