import React from "react";
import { Image } from "react-native";
import { isNilOrEmpty } from "@applicaster/zapp-react-native-utils/reactUtils/helpers";

type Props = {
  srcImage: string;
  config: {
    titleColor: string;
    summaryColor: string;
    backgroundColor: string;
    backgroundImage: string;
    isRTL: boolean;
  };
};

const imageStyles = {
  width: 128,
  height: 72,

  marginBottom: 30,
};

export function Channel({ srcImage }: Props) {
  if (isNilOrEmpty(srcImage)) {
    return null;
  }

  return (
    <Image fadeDuration={0} source={{ uri: srcImage }} style={imageStyles} />
  );
}
