import PropTypes from 'prop-types'
import Tabs from '@mui/material/Tabs'
import Tab from '@mui/material/Tab'
import Box from '@mui/material/Box'
import Button from '@mui/material/Button'
import {Paypal, Liberapay} from '@icons-pack/react-simple-icons'
import Grid from '@mui/material/Unstable_Grid2'
const PAYPAL_ID = process.env.NEXT_PUBLIC_PAYPAL_DONATE_ID
const LIBERAPAY_DONATE = process.env.NEXT_PUBLIC_LIBERAPAY_DONATE
function TabPanel(props) {
const {children, value, index, ...other} = props
return (
{value === index && (
{children}
)}
)
}
TabPanel.propTypes = {
children: PropTypes.node,
index: PropTypes.number.isRequired,
value: PropTypes.number.isRequired,
}
function a11yProps(index) {
return {
id: `simple-tab-${index}`,
'aria-controls': `simple-tabpanel-${index}`,
}
}
export default function PaymentMethod({paymentMethod, setPaymentMethod}) {
const handleChange = (event, newValue) => {
setPaymentMethod(newValue)
}
return (
} onClick={() => window.open(`https://liberapay.com/${LIBERAPAY_DONATE}/donate`, '_blank')}>
Faire un don via Liberapay
} onClick={() => window.open(`https://www.paypal.com/donate/?hosted_button_id=${PAYPAL_ID}`, '_blank')}>
Faire un don via PayPal
)
}
PaymentMethod.propTypes = {
paymentMethod: PropTypes.number.isRequired,
setPaymentMethod: PropTypes.func.isRequired
}