// withHooks

import { LibIcon } from 'esoftplay/cache/lib/icon/import';
import { LibUtils } from 'esoftplay/cache/lib/utils/import';
import React from 'react';
import { Text, View } from 'react-native';


export interface EventAlertArgs {
  
}
export interface EventAlertProps {
  color: string
  useIcon?: boolean
  iconName?: string
  msg: string
  style?: any
}
export default function m(props: EventAlertProps): any {
  return (
    <View style={[{ margin: 10, backgroundColor: LibUtils.hexToRgba(props.color, 0.1) }, props.style]}>
      <View style={{ height: 3, backgroundColor: props.color }} />
      <View style={{ padding: 10, marginRight: 10, flexDirection: 'row', alignContent: 'center', alignItems: 'center' }}>
        {
          props.useIcon &&
          <LibIcon name={props.iconName || 'information-outline'} size={18} />
        }
        <Text allowFontScaling={false} style={{ marginHorizontal: 10, fontSize: 12, lineHeight: 14, letterSpacing: 0.5, textAlign: 'justify' }}>{props.msg}</Text>
      </View>
    </View>
  )
}