import { Image, ImageSource } from 'expo-image';
import * as React from 'react';
import {
  SectionList,
  SectionListData,
  SectionListRenderItemInfo,
  StyleSheet,
  View,
  Platform,
} from 'react-native';

import HeadingText from '../../components/HeadingText';
import { Colors } from '../../constants';

const data: SectionListData<ImageSource>[] = [
  {
    title: 'Animated WebP',
    data: [
      {
        uri: 'https://mathiasbynens.be/demo/animated-webp-supported.webp',
      },
    ],
  },
  {
    title: 'Animated PNG (APNG)',
    data: [
      {
        uri: 'https://apng.onevcat.com/assets/elephant.png',
      },
    ],
  },
  {
    title: 'GIF',
    data: [
      {
        uri: 'https://apng.onevcat.com/assets/elephant.gif',
      },
    ],
  },
  {
    title: 'Animated AVIF',
    data: [
      {
        uri: 'https://colinbendell.github.io/webperf/animated-gif-decode/2.avif',
      },
    ],
  },
  {
    title: 'HEIC',
    data: [
      {
        uri: 'https://nokiatech.github.io/heif/content/images/ski_jump_1440x960.heic',
      },
    ],
  },
  {
    title: 'Animated HEIC',
    data: [
      {
        uri: 'https://nokiatech.github.io/heif/content/image_sequences/starfield_animation.heic',
      },
    ],
  },
  {
    title: 'JPEG',
    data: [
      {
        uri: 'https://picsum.photos/id/1069/700/466.jpg',
      },
    ],
  },
  {
    title: 'JPEG (base64)',
    data: [
      {
        uri: 'data:image/jpeg;base64,/9j/4QDeRXhpZgAASUkqAAgAAAAGABIBAwABAAAAAQAAABoBBQABAAAAVgAAABsBBQABAAAAXgAAACgBAwABAAAAAgAAABMCAwABAAAAAQAAAGmHBAABAAAAZgAAAAAAAABIAAAAAQAAAEgAAAABAAAABwAAkAcABAAAADAyMTABkQcABAAAAAECAwCGkgcAFgAAAMAAAAAAoAcABAAAADAxMDABoAMAAQAAAP//AAACoAQAAQAAAMgAAAADoAQAAQAAAKAAAAAAAAAAQVNDSUkAAABQaWNzdW0gSUQ6IDI3N//bAEMACAYGBwYFCAcHBwkJCAoMFA0MCwsMGRITDxQdGh8eHRocHCAkLicgIiwjHBwoNyksMDE0NDQfJzk9ODI8LjM0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HFz//2Q==',
      },
    ],
  },
  {
    title: 'SVG',
    data: [
      {
        uri: 'https://icon-icons.com/downloadimage.php?id=98748&root=1446/SVG/&file=22221cat_98748.svg',
      },
    ],
  },
  {
    title: 'SVG (base64)',
    data: [
      {
        uri: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxNi4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+DQo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB3aWR0aD0iMTI2cHgiIGhlaWdodD0iMTI2cHgiIHZpZXdCb3g9IjAgMCAxMjYgMTI2IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxMjYgMTI2IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxyZWN0IHg9IjEuMDk1IiB5PSI5OC4yMjQiIHdpZHRoPSIxMjMuODEiIGhlaWdodD0iMTkuMjc1Ii8+DQoJPHJlY3QgeD0iMS4wOTUiIHk9Ijg1Ljc0IiB3aWR0aD0iMTIzLjgxIiBoZWlnaHQ9IjUuMjA1Ii8+DQoJPHBhdGggZD0iTTE4LjQwNCw5NS43MjFjMC43NjcsMCwxLjM4OS0wLjYyMywxLjM4OS0xLjM5cy0wLjYyMi0xLjM4OC0xLjM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
    data: [
      {
        uri: 'https://icon-icons.com/downloadimage.php?id=132404&root=2148/ICO/512/&file=expo_icon_132404.ico',
      },
    ],
  },
  Platform.OS === 'ios' && {
    title: 'ICNS',
    data: [
      {
        uri: 'https://icon-icons.com/downloadimage.php?id=214748&root=3398/ICNS/512/&file=react_logo_icon_214748.icns',
      },
    ],
  },
].filter(Boolean) as SectionListData<ImageSource>[];

function keyExtractor(item: any, index: number) {
  return '' + index;
}

function renderItem({ item }: SectionListRenderItemInfo<ImageSource>) {
  return <Image style={styles.image} contentFit="contain" source={item} />;
}

function renderSectionHeader({ section }: { section: SectionListData<ImageSource> }) {
  return (
    <View style={styles.header}>
      <HeadingText style={styles.title}>{section.title}</HeadingText>
    </View>
  );
}

export default function ImageFormatsScreen() {
  return (
    <SectionList
      sections={data}
      keyExtractor={keyExtractor}
      renderItem={renderItem}
      renderSectionHeader={renderSectionHeader}
    />
  );
}

const styles = StyleSheet.create({
  image: {
    marginVertical: 10,
    width: '100%',
    height: 160,
  },
  header: {
    paddingHorizontal: 10,
    paddingVertical: 6,
    backgroundColor: Colors.greyBackground,
    borderTopColor: Colors.border,
    borderTopWidth: StyleSheet.hairlineWidth,
  },
  title: {
    marginTop: -12,
  },
});
