import React from 'react';
import './price-list-item.scss';

interface IProps {
  data: any;
}

interface IState {
  price?: String;
}

export class PriceListItem extends React.Component<IProps, IState> {
  constructor(props: IProps) {
    super(props);
    this.state = {};
  }

  componentDidMount() {}

  render() {
    const { fullText, icon, priceInfo, typeLine } = this.props.data;

    return (
      <div className="pli" title={fullText}>
        <div style={{ width: '100px' }}>
          <img src={icon} className="pli__img" />
        </div>
        <div style={{ flex: 1 }}>
          <div style={{ marginBottom: '10px' }}>
            <b>{typeLine}</b>
          </div>
          <div>
            {priceInfo ? `${priceInfo.min || priceInfo.min_price} ${priceInfo.currency || priceInfo.currency_rec}` : ''}
          </div>
        </div>
      </div>
    );
  }
}
