// @flow import React from 'react'; import { Modal } from 'modal/modal'; import { FormField } from 'component/common/form'; import Button from 'component/button'; import usePersistedState from 'effects/use-persisted-state'; import Card from 'component/common/card'; import I18nMessage from 'component/i18nMessage'; type Props = { uri: string, claim: StreamClaim, claimIsMine: boolean, closeModal: () => void, deleteFile: (string, boolean, boolean) => void, title: string, fileInfo?: { outpoint: ?string, }, }; function ModalRemoveFile(props: Props) { const { uri, claimIsMine, closeModal, deleteFile, title, claim } = props; const [deleteChecked, setDeleteChecked] = usePersistedState('modal-remove-file:delete', true); const [abandonChecked, setAbandonChecked] = usePersistedState('modal-remove-file:abandon', true); return ( {`"${title}"`} }}> Are you sure you'd like to remove %title% from LBRY? } body={ {/* @if TARGET='app' */} setDeleteChecked(!deleteChecked)} /> {/* @endif */} {claimIsMine && ( setAbandonChecked(!abandonChecked)} /> {abandonChecked === true && (

{__('This action is permanent and cannot be undone.')}

)} {/* @if TARGET='app' */} {abandonChecked === false && deleteChecked && (

{__('This file will be removed from your Library and Downloads folder.')}

)} {!deleteChecked && (

{__('This file will be removed from your Library but will remain in your Downloads folder.')}

)} {/* @endif */}
)}
} actions={
} />
); } export default ModalRemoveFile;