import React from 'react';
import { Button } from 'antd';

import '../g.scss';

function FooterBtn(props: IFooterBtn) {
  const { okBtn = '保存', cancelBtn = '取消', change, saveStatus } = props;
  return (
    <div className="zl-ls-setting-footer-btn">
      <Button onClick={() => change('cancelLinkPageEvent')}>{cancelBtn}</Button>
      <Button
        type="primary"
        onClick={() => change('saveLinkPageEvent')}
        disabled={saveStatus}
      >
        {okBtn}
      </Button>
    </div>
  );
}

export default FooterBtn;

export interface IFooterBtn {
  change: Function;
  okBtn?: string;
  cancelBtn?: string;
  linkTarget?: string;
  saveStatus?: boolean;
}
