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

const type = [
  {
    value: 'KPI',
    label: 'KPI',
  },
  {
    value: 'Gatau',
    label: 'Gatau',
  },
];
const approve_by = [
  {
    value: '1',
    label: 'John Doe',
  },
  {
    value: '2',
    label: 'John Doe lagi',
  },
];
const operator = [
  {
    value: '1',
    label: '-',
  },
  {
    value: '2',
    label: 'AND',
  },
  {
    value: '3',
    label: 'OR',
  },
];

export default class CreateApprovalMatrix extends Component {
    render() {
        return (
            <div className="test app-popup-show" style={{ paddingTop: 100 }}>
                <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" style={{ padding: 20 }}>
                        <div className="grid grid-2x grid-mobile-none gap-15px">
                            <div className="column-1">
                                <div className="margin-bottom-20px">
                                    <TextField
                                        style={{ width: '100%', height: '90%' }}
                                        id="id"
                                        variant="filled"
                                        label="ID"
                                        // value={this.state.periode}
                                    >
                                        {/* {periode.map((option) => (
                                            <MenuItem key={option.value} value={option.value}>
                                                {option.label}
                                            </MenuItem>
                                        ))} */}
                                    </TextField>
                                </div>
                            </div>
                            <div className="column-2">
                                <div className="margin-bottom-20px" style={{ marginTop: 8 }}>
                                    <TextField
                                        style={{ width: '100%' }}
                                        id="type"
                                        select
                                        label="Tipe Persetujuan"
                                        // value={this.state.periode}
                                        onChange={(e) => null}
                                    >
                                        {type.map((option) => (
                                            <MenuItem key={option.value} value={option.value}>
                                                {option.label}
                                            </MenuItem>
                                        ))}
                                    </TextField>
                                </div>
                            </div>
                        </div>
                        <div className="grid grid-2x grid-mobile-none gap-15px">
                            <div className="column-1">
                                <div className="margin-bottom-20px">
                                    <TextField
                                        style={{ width: '100%' }}
                                        id="order"
                                        label="Order"
                                        // value={this.state.periode}
                                    >
                                        {/* {periode.map((option) => (
                                            <MenuItem key={option.value} value={option.value}>
                                                {option.label}
                                            </MenuItem>
                                        ))} */}
                                    </TextField>
                                </div>
                            </div>
                            <div className="column-2">
                                <div className="margin-bottom-20px">
                                    <TextField
                                        style={{ width: '100%' }}
                                        id="approve-by"
                                        select
                                        label="Pemberi Persetujuan"
                                        // value={this.state.periode}
                                        onChange={(e) => null}
                                    >
                                        {approve_by.map((option) => (
                                            <MenuItem key={option.value} value={option.value}>
                                                {option.label}
                                            </MenuItem>
                                        ))}
                                    </TextField>
                                </div>
                            </div>
                        </div>
                        <div className="grid grid-2x grid-mobile-none gap-15px">
                            <div className="column-1">
                                <div className="margin-bottom-20px">
                                    <TextField
                                        style={{ width: '100%' }}
                                        id="operator"
                                        select
                                        label="Operator"
                                        // value={this.state.periode}
                                        onChange={(e) => null}
                                    >
                                        {operator.map((option) => (
                                            <MenuItem key={option.value} value={option.value}>
                                                {option.label}
                                            </MenuItem>
                                        ))}
                                    </TextField>
                                </div>
                            </div>
                            <div className="column-2">
                                
                            </div>
                        </div>
                        <div className="grid grid-2x grid-mobile-none gap-15px">
                            <div className="column-1">
                                <div className="margin-bottom-20px">
                                    <TextField
                                        style={{ width: '100%' }}
                                        id="start-period"
                                        label="Berlaku Mulai"
                                        // value={this.state.periode}
                                    >
                                        {/* {periode.map((option) => (
                                            <MenuItem key={option.value} value={option.value}>
                                                {option.label}
                                            </MenuItem>
                                        ))} */}
                                    </TextField>
                                </div>
                            </div>
                            <div className="column-2">
                                <div className="margin-bottom-20px">
                                    <TextField
                                        style={{ width: '100%' }}
                                        id="end-period"
                                        label="Berlaku Hingga"
                                        // value={this.state.periode}
                                    >
                                        {/* {periode.map((option) => (
                                            <MenuItem key={option.value} value={option.value}>
                                                {option.label}
                                            </MenuItem>
                                        ))} */}
                                    </TextField>
                                </div>
                            </div>
                        </div>
                        <div className="grid grid-2x grid-mobile-none gap-15px">
                            <div className="column-1">
                                <div className="margin-bottom-20px">
                                    <TextField
                                        style={{ width: '100%' }}
                                        id="status"
                                        variant="filled"
                                        label="Aktif"
                                        // value={this.state.periode}
                                    >
                                        {/* {periode.map((option) => (
                                            <MenuItem key={option.value} value={option.value}>
                                                {option.label}
                                            </MenuItem>
                                        ))} */}
                                    </TextField>
                                </div>
                            </div>
                            <div className="column-2">
                                <div className="margin-bottom-20px" style={{ marginTop: 8 }}>
                                    <TextField
                                        style={{ width: '100%' }}
                                        id="max-value"
                                        label="Max Value"
                                        // value={this.state.periode}
                                    >
                                        {/* {periode.map((option) => (
                                            <MenuItem key={option.value} value={option.value}>
                                                {option.label}
                                            </MenuItem>
                                        ))} */}
                                    </TextField>
                                </div>
                            </div>
                        </div>
                        <div className="">
                            <span style={{ fontSize: 11, fontWeight: 600 }}>Dibuat<span style={{ marginLeft: 20}}> : Admin - 21 Jul 2020, 18:45</span></span>
                        </div>
                        <div className="">
                            <span style={{ fontSize: 11, fontWeight: 'bold' }}>Diubah<span style={{ marginLeft: 17}}> : Admin - 21 Jul 2020, 18:45</span></span>
                        </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' }}>
                            <div onClick={() => this.props.onClickClose()} style={{ width: 102, height: 30, border: 'solid 1px #354960', borderRadius: 5, alignItems: 'center', display: 'flex', justifyContent: 'center', cursor:"pointer" }}>
                                <span style={{ color: '#354960', fontSize: 11 }} >Batal</span>
                            </div>
                        </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', cursor:"pointer" }}>
                                <span style={{ color: '#fff', fontSize: 11 }}>Simpan</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        );
    }
}
