let Utils = require('../utils/Utils');
require('styles/ProWe_public.css');

import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { browserHistory } from 'react-router';
import {  getShowModalRegister,LOAD_VENDER_SUCCESS} from '../actions';
import { URL_LOAD_VENDER} from '../utils/URLs.js';
import { Nav, NavItem, OverlayTrigger, Popover, Modal, Overlay, ProgressBar,form, DropdownButton,MenuItem } from 'react-bootstrap';
const loadingImg = Utils.home + 'images/holder.gif';
const dressUrl = 'search/picSearchGetFile.shtml' 

export default class ShowPicAlbum extends React.Component {
  constructor(props) {
    super(props)
    this.state = ({
      showPics : true,
      overModal:false,
    })
    this.close = this.close.bind(this);
    this.BigPic = null;
    this.flags;
  }
   close() {
    this.props.callbackParent(false);
  }

  render() {
    console.log("==============bogPiP=======,",this.props.bigPic.photoUrl)
    let urlBig = Utils.serverName + 'search/picSearchGetFile.shtml?picPath=' + (this.props.bigPic?this.props.bigPic.photoUrl:"") + '&searchType='+this.props.user.userType;
    return (
     <Modal show={true}   onHide={this.close} >
          <Modal.Body className = "deleteClass" style = {{padding:"0px",border:"0px"}}>
              <div id="ProductDetails" className = 'imgCenter'>
                <i className="closeProDe iconfont" onClick = {this.close}>&#xe611;</i>
                <img src = {urlBig}/> 
              </div>
          </Modal.Body>
        </Modal>
     
    );
  }
}

ShowPicAlbum.propTypes = {
}

function mapStateToProps(state, ownProps) {
  return {
    getShowBigImg:state.getShowBigImg,
    vender: state.getVenderInfo,
  }
}

export default connect(mapStateToProps, {
 getShowModalRegister,
})(ShowPicAlbum)