// withHooks
// noPage

import { LibTextstyle } from 'esoftplay/cache/lib/textstyle/import';
import { MarketToggle } from 'esoftplay/cache/market/toggle/import';

import React from 'react';
import { View } from 'react-native';


export interface MarketInput_toggleProps {
  value: boolean,
  onChangeValue: () => void,
  type: 'success' | 'danger',
  title?: string,
  description?: string
}
export default function m(props: MarketInput_toggleProps): any {
  return (
    <View style={{ flexDirection: "row", alignItems: 'center', marginHorizontal: 17, marginVertical: 12 }} >
      <View style={{ flex: 1 }} >
        {
          props.title &&
          <LibTextstyle textStyle={'callout'} text={props.title} style={{}} />
        }
        {
          props.description &&
          <LibTextstyle textStyle={'caption2'} text={props.description} style={{ color: "#888" }} />
        }
      </View>
      <MarketToggle value={props.value} onChangeValue={props.onChangeValue} type={props.type} />
    </View>
  )
}