import * as React from 'react';
import Button from '@mui/material/Button';
import Typography from '@mui/material/Typography';
import InstagramIcon from '@mui/icons-material/Instagram';
import FacebookIcon from '@mui/icons-material/Facebook';
import WhatsAppIcon from '@mui/icons-material/WhatsApp';
import { styled } from '@mui/material/styles';
import Box from '@mui/material/Box';
import Grid from '@mui/material/Grid';
import Divider from '@mui/material/Divider';


export default function Footer({ whast = "", instagram = "", face = "" }) {
    

    return (
        <Box
            sx={{
                textAlign: 'center',
                bottom: 0,               // Posiciona o Box na parte inferior da tela
                left: 0,                 // Posiciona o Box na parte esquerda da tela
                width: '100%',           // Faz o Box ocupar toda a largura da tela
                display: 'flex',
                justifyContent: 'space-around', // Centraliza horizontalmente
                alignItems: 'center',     // Centraliza verticalmente
                backgroundColor: '#1c1c1e', // Define a cor de fundo (opcional)
                boxShadow: '0px -2px 10px rgba(0, 0, 0, 0.2)', // Adiciona uma sombra (opcional)
                height: 70,
                marginTop: 19
            }}
        >

            <Grid container xs={12} md={12}>
                <Grid direction={'row'} item xs={6} md={6}>

                    {instagram != "" ?
                        <Button target='_blank' href={instagram} sx={{ color: 'white' }}>
                            <InstagramIcon />
                        </Button>
                        :
                        null
                    }
                    {face != "" ?
                        <Button target='_blank' href={face} sx={{ color: 'white' }}>
                            <FacebookIcon />
                        </Button>
                        :
                        null
                    }


                    {whast != "" ?
                        <Button 
                        target='_blank'
                        href={`https://api.whatsapp.com/send?phone=${whast}&text=Ol%C3%A1%2C%20gostaria%20de%20mais%20informa%C3%A7%C3%B5es.`}
                        sx={{ color: 'white' }}
                        
                        
                        >
                            <WhatsAppIcon />
                        </Button>
                        : null
                    }

                </Grid>


                <Grid item xs={6} md={6}>
                    <Typography variant="" sx={{ color: 'white', fontWeight: 'bold' }}>
                        Desenvolvido por: <a href="https://www.inforservice.com.br/" target="_blank">InforService</a>
                    </Typography>
                </Grid>
            </Grid>
        </Box>

    );
}


