import VehicleReturnSettlementV2List from './VehicleReturnSettlementV2List.jsx';
import VehicleReturnSettlementV2Detail from './VehicleReturnSettlementV2Detail.jsx';

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

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

	return React.createElement(VehicleReturnSettlementV2List, {
		onOpenDetail: function (row) {
			setSelectedRow(row || null);
			setView('detail');
		}
	});
};

export default Component;
