import React, { Component } from 'react';
import { TextField, Typography } from '@material-ui/core';

const companies = [
    {
      value: '',
      label: '',
    },
    {
      value: '1',
      label: 'TIA',
    },
    {
      value: '2',
      label: 'TIA',
    },
  ];

  const dataTypes = [
    {
      value: '',
      label: '',
    },
    {
      value: '1',
      label: 'Formula',
    },
    {
      value: '2',
      label: 'Formula',
    },
  ];

  const reportTypes = [
    {
      value: '',
      label: '',
    },
    {
      value: '1',
      label: 'KPI',
    },
    {
      value: '2',
      label: 'KPI',
    },
  ];

  const parents = [
    {
      value: '-',
      label: '-',
    },
    {
      value: '1',
      label: '1',
    },
    {
      value: '2',
      label: '2',
    },
  ];

export default class CreateItemLaporan extends Component {

    componentDidMount() {
        console.log(this.props.data);
    }

    render() {
        return (
            <div className="test app-popup-show">
                <div className="popup-content background-white border-radius" style={{ borderRadius: 8 }}>
                    <div className="popup-panel grid grid-2x" style={{ backgroundColor: '#51c6ea', height: 64, borderTopRightRadius: 8, borderTopLeftRadius: 8 }}>
                        <div className="col-1" style={{ maxWidth: "inherit", display: 'flex', alignItems: 'center' }}>
                            <div className="popup-title">
                                <span style={{ color: '#fff', fontSize: 16, fontWeight: 'bold' }}>Tambah Data</span>
                            </div>
                        </div>
                        <div className="col-2 content-right" style={{ maxWidth: "inherit", alignSelf: 'center' }}>
                            <button
                                type="button"
                                className="btn btn-circle btn-white"
                                onClick={() => this.props.onClickClose()}
                            >
                                <i className="fa fa-lg fa-times" style={{ color: 'white' }} />
                            </button>
                        </div>
                    </div>


                    <div className="border-bottom grid grid-2x grid-mobile-none gap-15px" style={{ padding: 20 }}>
                        <div className="column-1">
                            <div style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}>
                                <TextField
                                    style={{ width: '100%' }}
                                    value={1}
                                    id="ID"
                                    label="ID"
                                    disabled
                                    inputProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            paddingLeft: 10
                                        }
                                    }}
                                    InputLabelProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            color: '#7e8085',
                                            paddingLeft: 10
                                        }
                                    }}
                                />
                            </div>
                            <div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
                                <TextField
                                    id="company"
                                    style={{ width: '100%' }}
                                    select
                                    label="Perusahaan"
                                    // onChange={handleChange}
                                    helperText=""
                                    SelectProps={{
                                        native: true,
                                    }}
                                    InputLabelProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            color: '#7e8085',
                                            paddingLeft: 10
                                        }
                                    }}
                                    inputProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            paddingLeft: 10
                                        }
                                    }}
                                    >
                                    {companies.map((option) => (
                                        <option key={option.value} value={option.value}>
                                        {option.label}
                                        </option>
                                    ))}
                                </TextField>
                            </div>
                            <div style={{ padding: 10, borderRadius: 5 }}>
                                <TextField
                                    style={{ width: '100%' }}
                                    id="description"
                                    label="Deskripsi"
                                    // value={this.props.data.business_unit_name}
                                    inputProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            paddingLeft: 10
                                        }
                                    }}
                                    InputLabelProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            color: '#7e8085',
                                            paddingLeft: 10
                                        }
                                    }}
                                >
                                </TextField>
                            </div>
                            <div style={{ padding: 10, borderRadius: 5 }}>
                                <TextField
                                    style={{ width: '100%' }}
                                    id="uom"
                                    label="UOM"
                                    // value={this.props.data.business_unit_name}
                                    inputProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            paddingLeft: 10
                                        }
                                    }}
                                    InputLabelProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            color: '#7e8085',
                                            paddingLeft: 10
                                        }
                                    }}
                                >
                                </TextField>
                            </div>
                            <div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
                                <TextField
                                    id="dataType"
                                    style={{ width: '100%' }}
                                    select
                                    label="Tipe Data"
                                    // onChange={handleChange}
                                    helperText=""
                                    SelectProps={{
                                        native: true,
                                    }}
                                    InputLabelProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            color: '#7e8085',
                                            paddingLeft: 10
                                        }
                                    }}
                                    inputProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            paddingLeft: 10
                                        }
                                    }}
                                    >
                                    {dataTypes.map((option) => (
                                        <option key={option.value} value={option.value}>
                                        {option.label}
                                        </option>
                                    ))}
                                </TextField>
                            </div>

                            <div className="margin-top-10px" style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}>
                                <TextField
                                    style={{ width: '100%' }}
                                    // value={this.props.data.status}
                                    id="realValue"
                                    label="Nilai Seharusnya"
                                    value="-"
                                    disabled
                                    inputProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            paddingLeft: 10
                                        }
                                    }}
                                    InputLabelProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            color: '#7e8085',
                                            paddingLeft: 10
                                        }
                                    }}
                                />
                            </div>
                            <div style={{ padding: 10, borderRadius: 5 }}>
                                <TextField
                                    style={{ width: '100%' }}
                                    id="startDate"
                                    label="Berlaku Mulai"
                                    // value={this.props.data.business_unit_name}
                                    inputProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            paddingLeft: 10
                                        }
                                    }}
                                    InputLabelProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            color: '#7e8085',
                                            paddingLeft: 10
                                        }
                                    }}
                                >
                                </TextField>
                            </div>
                            <div style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}>
                                <TextField
                                    style={{ width: '100%' }}
                                    value="Aktif"
                                    id="status"
                                    label="Status"
                                    disabled
                                    inputProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            paddingLeft: 10
                                        }
                                    }}
                                    InputLabelProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            color: '#7e8085',
                                            paddingLeft: 10
                                        }
                                    }}
                                />
                            </div>

                            <div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
                                <div style={{display: 'flex'}}>
                                    <Typography style={{ fontSize: 11, width: '20%' }}>Dibuat</Typography>
                                    <Typography style={{ fontSize: 11 }}>: Admin - 21 Jul 2020, 18:45</Typography>
                                </div>
                                <div style={{display: 'flex'}}>
                                    <Typography style={{ fontSize: 11, width: '20%' }}>Diubah</Typography>
                                    <Typography style={{ fontSize: 11 }}>: Admin - 21 Jul 2020, 18:45</Typography>
                                </div>
                            </div>
                        </div>

                        <div className="column-2">
                            <div style={{ padding: 10, borderRadius: 5 }}>
                            <TextField
                                    id="reportType"
                                    style={{ width: '100%' }}
                                    select
                                    label="Jenis Laporan"
                                    // onChange={handleChange}
                                    helperText=""
                                    SelectProps={{
                                        native: true,
                                    }}
                                    InputLabelProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            color: '#7e8085',
                                            paddingLeft: 10
                                        }
                                    }}
                                    inputProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            paddingLeft: 10
                                        }
                                    }}
                                    >
                                    {reportTypes.map((option) => (
                                        <option key={option.value} value={option.value}>
                                        {option.label}
                                        </option>
                                    ))}
                                </TextField>
                            </div>
                            <div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
                                <TextField
                                    style={{ width: '100%' }}
                                    id="order"
                                    label="Order"
                                    value="1"
                                    inputProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            paddingLeft: 10
                                        }
                                    }}
                                    InputLabelProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            color: '#7e8085',
                                            paddingLeft: 10
                                        }
                                    }}
                                >
                                </TextField>
                            </div>
                            <div style={{ padding: 10, borderRadius: 5 }}>
                            <TextField
                                    id="parent"
                                    style={{ width: '100%' }}
                                    select
                                    label="Parent"
                                    // onChange={handleChange}
                                    helperText=""
                                    SelectProps={{
                                        native: true,
                                    }}
                                    InputLabelProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            color: '#7e8085',
                                            paddingLeft: 10
                                        }
                                    }}
                                    inputProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            paddingLeft: 10
                                        }
                                    }}
                                    >
                                    {parents.map((option) => (
                                        <option key={option.value} value={option.value}>
                                        {option.label}
                                        </option>
                                    ))}
                                </TextField>
                            </div>
                            <div style={{ padding: 10, borderRadius: 5 }}>
                                <TextField
                                    style={{ width: '100%' }}
                                    id="weight"
                                    label="Weight"
                                    value="1"
                                    inputProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            paddingLeft: 10
                                        }
                                    }}
                                    InputLabelProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            color: '#7e8085',
                                            paddingLeft: 10
                                        }
                                    }}
                                >
                                </TextField>
                            </div>
                            <div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
                                <TextField
                                    style={{ width: '100%' }}
                                    id="formula"
                                    label="Formula"
                                    value="1"
                                    inputProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            paddingLeft: 10
                                        }
                                    }}
                                    InputLabelProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            color: '#7e8085',
                                            paddingLeft: 10
                                        }
                                    }}
                                >
                                </TextField>
                            </div>
                            <div className="margin-top-10px"  style={{ backgroundColor: '#e8e8e8', padding: 10, borderRadius: 5 }}>
                                <TextField
                                    style={{ width: '100%' }}
                                    value="-"
                                    id="isWrongCondition"
                                    label="Kondisi Jika Salah"
                                    disabled
                                    inputProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            paddingLeft: 10
                                        }
                                    }}
                                    InputLabelProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            color: '#7e8085',
                                            paddingLeft: 10
                                        }
                                    }}
                                />
                            </div>
                            <div className="margin-top-10px" style={{ padding: 10, borderRadius: 5 }}>
                                <TextField
                                    style={{ width: '100%' }}
                                    id="unit"
                                    label="Berlaku Hingga"
                                    // defaultValue={"31 Desember 2100"}
                                    inputProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif'
                                        }
                                    }}
                                    InputLabelProps={{
                                        style: {
                                            fontSize: 11,
                                            fontWeight: 600,
                                            fontFamily: 'Nunito Sans, sans-serif',
                                            color: '#7e8085'
                                        }
                                    }}
                                >
                                </TextField>
                            </div>
                        </div>

                    </div>

                    <div className="border-top grid grid-2x" style={{ height: 56, backgroundColor: '#f5f5f5', paddingLeft: 20, paddingRight: 20 }}>
                        <div className="column-1" style={{ alignSelf: 'center' }}>
                            <button
                                type="button"
                                onClick={() => this.props.onClickClose()}
                            >
                                <div style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
                                    <span style={{ color: '#354960', fontSize: 11 }}>Batal</span>
                                </div>
                            </button>
                        </div>
                        <div className="column-2" style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}>
                            <div style={{ width: 102, height: 30, backgroundColor: '#354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center' }}>
                                <span style={{ color: '#fff', fontSize: 11 }}>Simpan</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        )
    }
}
