import React, { useContext } from 'react';
import ReactMarkdown from 'react-markdown';
import AppContext from '../../context/AppContext';
import { hexToRgb } from '../../utils';
const Gengar = () => {
const context = useContext(AppContext);
const { state } = context;
const { data, theme } = state;
const { r, g, b } = hexToRgb(theme.colors.accent) || {};
const Photo = () =>
data.profile.photo !== '' && (
);
const FullName = () => (
{data.profile.firstName}
{data.profile.lastName}
);
const ContactItem = ({ icon, value, link = '#' }) =>
value && (
);
const Heading = ({ title }) => (
{title}
);
const Objective = () =>
data.objective &&
data.objective.enable && (
);
const SkillItem = x => (
{x}
);
const Skills = () =>
data.skills &&
data.skills.enable && (
{data.skills.items.map(SkillItem)}
);
const EducationItem = x => (
{x.name}
{x.start !== '' && x.end !== '' && (
({x.start} - {x.end})
)}
{x.major}
{x.grade}
);
const Education = () =>
data.education &&
data.education.enable && (
{data.education.items.map(EducationItem)}
);
const CertificationItem = x => (
);
const Certifications = () =>
data.certifications &&
data.certifications.enable && (
{data.certifications.items.map(CertificationItem)}
);
const AwardItem = x => (
);
const Awards = () =>
data.awards &&
data.awards.enable && (
{data.awards.items.map(AwardItem)}
);
const ReferenceItem = x => (
{x.name}
{x.position}
{x.phone}
{x.email}
);
const References = () =>
data.references &&
data.references.enable && (
{data.references.items.map(ReferenceItem)}
);
const WorkItem = x => (
);
const Work = () =>
data.work &&
data.work.enable && (
{data.work.items.map(WorkItem)}
);
const LanguageItem = x => (
{x.key}
{Array.from(Array(x.value)).map((_, i) => (
star
))}
);
const Languages = () =>
data.languages &&
data.languages.enable && (
{data.languages.items.map(LanguageItem)}
);
const ExtraItem = x => (
{x.key}
{x.value}
);
const Extras = () =>
data.extras &&
data.extras.enable && (
{data.extras.items.map(ExtraItem)}
);
return (
);
};
export default Gengar;