import ReturnSettlementListPage from '../oneos-web-finance/pages/03-还车应结款.jsx';
import VehicleReturnSettlementHandle from './VehicleReturnSettlementHandle.jsx';

const Component = function (props) {
	var useState = React.useState;
	var _view = useState('list');
	var view = _view[0];
	var setView = _view[1];
	var _selectedRow = useState(null);
	var selectedRow = _selectedRow[0];
	var setSelectedRow = _selectedRow[1];

	if (view === 'handle') {
		return React.createElement(VehicleReturnSettlementHandle, {
			row: selectedRow,
			onBack: function () {
				setSelectedRow(null);
				setView('list');
			}
		});
	}

	return React.createElement(ReturnSettlementListPage, {
		onGoHandle: function (row) {
			setSelectedRow(row || null);
			setView('handle');
		}
	});
};

export default Component;
