import React, { Component } from 'react';

import { AbstractForm, ButtonBar, Button } from 'lib/components';
import TaxItems from 'components/TaxItems';
import Attachments from 'lib/attachment';
import Toast from 'components/Toast';

import form from 'lib/form';
import validator from 'lib/validator';
import { injectIntl } from 'react-intl';



/*

	private Integer year;
    private LocalDate date;

*/

class DphParamsForm extends AbstractForm {


	render() {
		let { attachments, intl, disabled } = this.props;
		let fieldProps = { disabled };

		return (
			<div className="form">
				<div className="row row-margin-10">
					<div className="col-xs-12">
						<div className="row row-margin-10">
							{ this.props.periodType == "QUARTER" ? this.renderNumericField("quarter", "Čtvrtletí", fieldProps) : this.renderNumericField("month", "Měsíc", fieldProps) }
							{ this.renderField("year", "Rok", fieldProps) }
							
							{ this.renderDateField("date", "Datum vyhotovení", fieldProps) }
						</div>

					</div>
				</div>
			</div>
		);
	}

}


export default form(injectIntl(DphParamsForm), {
	onValidationFailed: Toast.validationFailed,
	validate: (email, error) => {
		let valid = true;
		return valid;
	}
});

