import StringPopUpNotice from "./notice";
import { sprintf, __ } from "@wordpress/i18n";
import FormatNumberCount from "../component/format-number-count";
import Notice from "../component/notice";

const StringPopUpFooter = (props) => {

    return (
        <div className="modal-footer" key={props.modalRender}>
            <div className="atfp-string-footer-container">
                {!props.translatePendingStatus && <Notice className='atfp-notice atfp-notice-info' type="alert"><div>{__('Wahooo! You have saved your valuable time via auto translating', 'automatic-translations-for-polylang')} <strong><FormatNumberCount number={props.characterCount} /></strong> {__('characters using', 'automatic-translations-for-polylang')} <a href="https://wordpress.org/support/plugin/automatic-translations-for-polylang/reviews/#new-post" target="_blank" rel="noopener"><strong>AutoPoly - AI Translation for Polylang</strong></a>!</div></Notice>}
                <div className="save_btn_cont">
                    <button className="notranslate save_it button button-primary" disabled={props.translatePendingStatus} onClick={props.updatePostData}>{props.translateButtonStatus ? <><span className="updating-text">{__("Updating", 'automatic-translations-for-polylang')}<span className="dot" style={{ "--i": 0 }}></span><span className="dot" style={{ "--i": 1 }}></span><span className="dot" style={{ "--i": 2 }}></span></span></> : __("Update Content", 'automatic-translations-for-polylang')}</button>
                </div>
            </div>
        </div>
    );
}

export default StringPopUpFooter;