import React, { Component, useEffect } from 'react';
import { observer, inject } from "mobx-react";
import { Page, Navbar, List, ListItem, Icon, Toggle, Toolbar, Link } from 'framework7-react';
import { f7 } from 'framework7-react';
import { useTranslation } from 'react-i18next';
import {Device} from "../../../utils/device";
const PageReview = props => {
const { t } = useTranslation();
const _t = t('Common.Collaboration', {returnObjects: true});
return (
{
props.onTrackChanges(!prev);
}
}/>
{
props.onAcceptAll();
}}>
{
props.onRejectAll();
}}>
)
};
const DisplayMode = props => {
const { t } = useTranslation();
const _t = t('Common.Collaboration', {returnObjects: true});
const mode = props.storeReview.displayMode;
return (
{
props.onDisplayMode('markup');
}}
>
{
props.onDisplayMode('final');
}}
>
{
props.onDisplayMode('original');
}}
>
)
};
const PageReviewChange = props => {
const isAndroid = Device.android;
const { t } = useTranslation();
const _t = t('Common.Collaboration', {returnObjects: true});
const change = props.change;
return (
{_t.textAccept}
{_t.textReject}
{props.goto && }
{change ?
{isAndroid &&
{change.initials}
}
{change.userName}
{change.date}
:
{_t.textNoChanges}
}
)
};
const PageDisplayMode = inject("storeReview")(observer(DisplayMode));
export {PageReview, PageDisplayMode, PageReviewChange};