import { useState } from "react";
import {Accordion,  Button, Col, Container, Form, Image, Modal, Row, Stack, Tab, Tabs, ListGroupItem } from "react-bootstrap";
import ReCAPTCHA from "react-google-recaptcha";

interface FormValues {
  name: string;
  email: string;
  phoneNumber: string;
  service: string;
  requirements: string;
  captchaToken: string | null;
}

const HomeOurProcess = () => {

    const [show, seShow] = useState(false);
    const [loading, setLoading] = useState(false);
    const [hiredeveloperform, sethiredeveloperform] = useState<FormValues>({
        name: "",
        email: "",
        phoneNumber: "",
        service: "",
        requirements: "",
        captchaToken: null
    });
          
    const [errors, seterrors] = useState<FormValues>({
        name: "",
        email: "",
        phoneNumber: "",
        service: "",
        requirements: "",
        captchaToken: null
    });

    const handleCaptchaChange = (token: string | null) => {
        sethiredeveloperform((prevFormData) => ({
        ...prevFormData,
        captchaToken: token,
        }));
        seterrors((prevErrors) => ({
        ...prevErrors,
        captchaToken: null, // Clear the error
        }));
        setResponse(null);
    };

    const [response, setResponse] = useState<{ status: string; message: string } | null>(null);
    
    const handleShow = () => {
        seShow(true)
    }

    const handleClose = () => {
        seShow(false);
        sethiredeveloperform({
            name: "",
            email: "",
            phoneNumber: "",
            service: "",
            requirements: "",
            captchaToken: null
        });
        seterrors({
            name: "",
            email: "",
            phoneNumber: "",
            service: "",
            requirements: "",
            captchaToken: null
        })
    }

    const handleChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => {
        const { name, value } = e.target;
        let updatedValue = value.replace(/<[^>]*>/g, "");
    
        if (name === "name") {
            updatedValue = updatedValue.replace(/[0-9]/g, "");
        }
        
        if (name === "phoneNumber") {
            updatedValue = updatedValue.replace(/[^\d+]/g, "");
        }
        sethiredeveloperform({ ...hiredeveloperform, [name]: updatedValue });
        seterrors((prev) => ({ ...prev, [name]: "" }));
        };
    
    const handleFocus = (e: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => {
        seterrors((prev: any) => ({
            ...prev,
            [e.target.name]: '',
        }));
    };

    const handleHireDeveloperForm = async (e: React.FormEvent<HTMLFormElement>) => {
        e.preventDefault();
        const newErrors: typeof errors = { name: "", email: "", phoneNumber: "", service: "", requirements: "", captchaToken: "" };
    
        sethiredeveloperform((prev) => ({
            ...prev,
            name: prev.name.trim(),
            email: prev.email.trim(),
            phoneNumber: prev.phoneNumber.trim(),
            service: prev.service.trim(),
            requirements: prev.requirements.trim(),
        }))
    
        if (!hiredeveloperform.name.trim()) {
            newErrors.name = "Please Enter Your Name";
        }
    
        if(!hiredeveloperform.email.trim()){
            newErrors.email = 'Please Enter Your Email'
        } else if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(hiredeveloperform.email)) {
            newErrors.email = "Please enter a valid email address";
        }
    
        if (!hiredeveloperform.phoneNumber.trim()) {
            newErrors.phoneNumber = "Please Enter your Phone Number";
        }
        else if (hiredeveloperform.phoneNumber.length < 10) {
            newErrors.phoneNumber = "Please Enter up to 10 digits";
        }

        if (!hiredeveloperform.service.trim()) {
            newErrors.service = "Please select your service.";
        }

        if (!hiredeveloperform.requirements.trim()) {
            newErrors.requirements = "Please enter your requirements";
        }

        if (!hiredeveloperform.captchaToken) {
            newErrors.captchaToken = "Please Validate the Captcha";
        }
    
        seterrors(newErrors);
        if (Object.values(newErrors).some((error) => error)) return;
    
        const formData = new FormData();
        formData.append("name", hiredeveloperform.name);
        formData.append("email", hiredeveloperform.email);
        formData.append("phoneNumber", hiredeveloperform.phoneNumber);
        formData.append("service", hiredeveloperform.service);
        formData.append("requirements", hiredeveloperform.requirements);

        if (hiredeveloperform.captchaToken) {
            formData.append("captcha", hiredeveloperform.captchaToken);
        }
        setLoading(true);
    
        try {
            const response = await fetch(`${process.env.REACT_APP_HIRE_DEVELOPER_API}`, {
            method: "POST",
            body: formData,
            });
            const result = await response.json();
    
            if (result.status === 'true') {
            setResponse(result);
            sethiredeveloperform({
                name: "",
                email: "",
                phoneNumber: "",
                service: "",
                requirements: "",
                captchaToken: null
            });
            setTimeout(() => {
                setResponse(null);
                window.location.reload();
            }, 5000);
            const items = document.querySelectorAll('.form-field .form-label');
            items.forEach((item) => {
                if (item.classList.contains('label-view')) {
                item.classList.remove('label-view');
                }
            });
            } else {
            setResponse(result);
            setTimeout(() => {
                setResponse(null);
            }, 5000)
            }
        } catch (error) {
            setResponse({ status: "false", message: "Something went wrong. Please try again." });
            setTimeout(() => {
            setResponse(null);
            },5000)
        } finally {
            setLoading(false);
        }
    };

    const handlelabel = (event: React.FormEvent<HTMLInputElement>) => {
        const inputElement = event.currentTarget;
        const fieldName = inputElement.getAttribute("name");
        const labelElement = document.querySelector(`label[data-name=${fieldName}]`)
    
        if(labelElement) {
            if(inputElement.value !== "") {
            labelElement.classList.add('label-view')
            } else {
            labelElement.classList.remove('label-view')
        }
        }
    }
    


    return (
        <Container className="margin-top-70 margin-bottom-70 our-process">
            <Row>
                <Col>
                    <h2 className="section-title text-center m-0">Our <span>Process</span></h2>
                    <Stack className="section-title-mark justify-content-center flex-row align-items-center">
                        <span></span>
                    </Stack>
                </Col>
            </Row>
            <Row>
                <Col md={5} className="our-process-img">
                    <Image src="/images/process.svg" />
                </Col>
                <Col md={7} className="our-process-content">
                    <Stack className="our-process-right-column flex-wrap flex-row">
                        <Accordion defaultActiveKey="0">
                            <Accordion.Item eventKey="0">
                                <Accordion.Header>
                                    <Stack className="steps-items align-items-center justify-content-center">
                                        <svg xmlns="http://www.w3.org/2000/svg" width="40" height="46" viewBox="0 0 40 46" fill="none">
                                            <path d="M23.698 15.4573H10.3126V16.6995H23.698V15.4573Z" fill="white"/>
                                            <path d="M23.698 17.9417H10.3126V19.1838H23.698V17.9417Z" fill="white"/>
                                            <path d="M21.5563 20.426H10.3126V21.6681H21.5563V20.426Z" fill="white"/>
                                            <path d="M23.6979 12.973H14.5958V14.2151H23.6979V12.973Z" fill="white"/>
                                            <path d="M8.74008 39.8975C8.77839 40.016 8.84691 40.118 8.93657 40.1901C9.02623 40.2621 9.13271 40.3007 9.24176 40.3006H34.4063C34.4703 40.2992 34.5336 40.2845 34.5932 40.2571C34.6049 40.2515 34.6167 40.2478 34.628 40.2416C34.682 40.213 34.7316 40.1742 34.7747 40.1267C34.7832 40.1173 34.7896 40.1068 34.7971 40.0975C34.8149 40.0783 34.8314 40.0575 34.8464 40.0354C34.8629 40.0055 34.8772 39.9741 34.8893 39.9416C34.893 39.9323 34.8978 39.9242 34.901 39.9149C34.9242 39.8475 34.9367 39.7757 34.938 39.7031C34.938 39.6957 34.9417 39.6888 34.9417 39.6814V15.4573C34.9417 14.7984 34.7161 14.1665 34.3144 13.7006C33.9128 13.2347 33.368 12.973 32.8001 12.973H30.6584C30.0904 12.973 29.5456 13.2347 29.144 13.7006C28.7423 14.1665 28.5167 14.7984 28.5167 15.4573V16.6995H26.9105V8.00433C26.9105 7.34547 26.6848 6.71357 26.2832 6.24763C25.8815 5.78174 25.3368 5.52 24.7688 5.52H7.1001C6.53212 5.52 5.98738 5.78174 5.58575 6.24763C5.18408 6.71357 4.95844 7.34547 4.95844 8.00433V9.24651C4.95844 9.41124 5.01487 9.5692 5.11528 9.68567C5.21569 9.80214 5.35186 9.86756 5.49387 9.86756H7.1001V24.1524H5.96826C5.70872 24.1525 5.4531 24.2254 5.22318 24.3651C4.99326 24.5047 4.79598 24.7069 4.64814 24.9543C4.50031 25.2017 4.40636 25.487 4.37436 25.7858C4.34232 26.0845 4.37317 26.3878 4.46426 26.6697L8.74008 39.8975ZM29.0521 17.9417C29.1941 17.9417 29.3303 17.8762 29.4307 17.7597C29.5311 17.6433 29.5876 17.4853 29.5876 17.3206V15.4573C29.5876 15.1279 29.7004 14.8119 29.9012 14.579C30.102 14.346 30.3744 14.2152 30.6584 14.2152H32.8001C33.084 14.2152 33.3564 14.346 33.5572 14.579C33.7581 14.8119 33.8709 15.1279 33.8709 15.4573V36.2542L30.3495 25.3623C30.2339 25.0077 30.0282 24.7021 29.7597 24.486C29.4911 24.27 29.1723 24.1536 28.8455 24.1524H26.9105V17.9417H29.0521ZM6.02929 8.00433C6.02929 7.67487 6.14211 7.35895 6.34292 7.126C6.54374 6.89306 6.81613 6.76219 7.1001 6.76219H22.9147C22.7258 7.13943 22.6266 7.56806 22.6272 8.00433V8.62542H6.02929V8.00433ZM8.17095 9.86756H23.1626C23.3046 9.86756 23.4408 9.80214 23.5412 9.68567C23.6416 9.5692 23.698 9.41124 23.698 9.24651V8.00433C23.698 7.67487 23.8108 7.35895 24.0116 7.126C24.2125 6.89306 24.4848 6.76219 24.7688 6.76219C25.0528 6.76219 25.3252 6.89306 25.526 7.126C25.7269 7.35895 25.8397 7.67487 25.8397 8.00433V24.1524H8.17095V9.86756ZM5.52813 25.6617C5.57706 25.5788 5.64281 25.5111 5.71951 25.4646C5.79624 25.418 5.88166 25.394 5.96826 25.3946H28.8455C28.9544 25.3947 29.0608 25.4333 29.1504 25.5053C29.2399 25.5773 29.3084 25.6793 29.3466 25.7977L33.6337 39.0584H9.61281L5.4671 26.2337C5.43617 26.1398 5.42554 26.0386 5.43617 25.9389C5.44684 25.8391 5.4784 25.744 5.52813 25.6617Z" fill="white"/>
                                            <path d="M32.8 15.4573H31.7292V16.6995H32.8V15.4573Z" fill="white"/>
                                            <path d="M13.525 12.973H12.4542V14.2151H13.525V12.973Z" fill="white"/>
                                        </svg> 
                                    </Stack>
                                    <Stack className="steps-title  justify-content-center">
                                        <label className="text-uppercase">Step 1</label>
                                        <span>Give Us Your Requirement</span>
                                    </Stack>
                                </Accordion.Header>
                                <Accordion.Body  className="p-0">
                                    <p>
                                        Your journey with us begins by sharing your
                                        requirements. Our dedicated Business Analyst (BA)
                                        works closely with you to understand your needs,
                                        ensuring every detail is meticulously captured.
                                    </p>
                                </Accordion.Body>
                            </Accordion.Item>
                            <Accordion.Item eventKey="1">
                                <Accordion.Header>
                                    <Stack className="steps-items align-items-center justify-content-center">
                                        <svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 50 50" fill="none">
                                            <path d="M25.0003 14.3981C27.178 14.3981 28.9491 12.6265 28.9491 10.4488C28.9491 8.27155 27.178 6.5 25.0003 6.5C22.8225 6.5 21.0514 8.27155 21.0514 10.4488C21.0514 12.6265 22.8225 14.3981 25.0003 14.3981ZM25.0003 7.4091C26.6764 7.4091 28.04 8.7727 28.04 10.4488C28.04 12.1254 26.6764 13.489 25.0003 13.489C23.3241 13.489 21.9605 12.1254 21.9605 10.4488C21.9605 8.7727 23.3241 7.4091 25.0003 7.4091Z" fill="white"/>
                                            <path d="M14.2174 21.8387C14.1605 22.5138 14.3701 23.1708 14.8077 23.6879C14.988 23.901 15.1993 24.0807 15.4337 24.2215L18.7824 26.2451C19.2387 26.5204 19.7731 26.6029 20.2907 26.4737C20.5704 26.4049 20.8251 26.2793 21.0444 26.1071L21.0861 26.5634L17.8174 40.2929C17.6522 40.9854 17.7667 41.7009 18.1405 42.3073C18.5133 42.9136 19.1002 43.3384 19.7927 43.504C19.9995 43.5528 20.2063 43.5768 20.4105 43.5768C21.6161 43.5759 22.7126 42.7507 23.0037 41.5278L25.0004 33.1432L26.997 41.5278C27.337 42.9585 28.7814 43.8414 30.2081 43.504C30.9005 43.3384 31.4874 42.9136 31.8603 42.3073C32.234 41.7009 32.3485 40.9854 32.1834 40.2929L28.9146 26.5634L28.9563 26.1062C29.5893 26.6025 30.4895 26.6855 31.2183 26.2447L34.5671 24.2219C35.1468 23.8717 35.5552 23.3168 35.7177 22.6589C35.8801 22.0015 35.7771 21.3202 35.4264 20.7405C35.2835 20.5034 35.1033 20.2926 34.892 20.1141L30.5703 16.4622C29.4978 15.5563 28.1351 15.0573 26.7324 15.0573H23.2683C21.8656 15.0573 20.5029 15.5563 19.4305 16.4622L15.1087 20.1146C14.5912 20.5518 14.2742 21.1639 14.2174 21.8387ZM15.6946 20.8088L20.0163 17.1565C20.9254 16.389 22.0804 15.9664 23.2683 15.9664H26.7324C27.9203 15.9664 29.0753 16.389 29.9844 17.1565L34.3061 20.8088C34.4419 20.9229 34.5564 21.0587 34.6488 21.2101C34.8734 21.5821 34.9391 22.0193 34.8352 22.441C34.7305 22.8632 34.4685 23.2191 34.0965 23.4438L30.7488 25.4666C30.2356 25.7764 29.568 25.6108 29.2591 25.0995C28.951 24.5877 29.1161 23.9201 29.6275 23.6111L31.7892 22.3056C31.9144 22.2297 31.9951 22.0983 32.0067 21.9523C32.0182 21.8062 31.9588 21.6638 31.8469 21.5692L29.3664 19.4736C29.2368 19.3635 29.0549 19.3351 28.9013 19.4004C28.7442 19.4643 28.6358 19.6108 28.6208 19.7794L28.0019 26.555C27.9975 26.6042 28.001 26.6535 28.0126 26.7014L31.2992 40.5033C31.5238 41.4452 30.9396 42.3947 29.9968 42.6193C29.0619 42.8453 28.1058 42.2602 27.8812 41.3174L25.4424 31.0755C25.3448 30.6663 24.6559 30.6663 24.5583 31.0755L22.1195 41.3174C21.894 42.2598 20.9459 42.8439 20.004 42.6193C19.0611 42.3947 18.4769 41.4453 18.7015 40.5033L21.9881 26.7014C21.9997 26.6535 22.0032 26.6038 21.9988 26.555L21.3791 19.7794C21.3631 19.6107 21.2557 19.4643 21.0986 19.3999C21.0427 19.3773 20.9849 19.3662 20.9263 19.3662C20.8207 19.3662 20.7168 19.403 20.6334 19.4736L18.1538 21.5692C18.0419 21.6637 17.9824 21.8062 17.994 21.9523C18.0055 22.0983 18.0864 22.2297 18.2115 22.3056L20.3732 23.6106C20.8846 23.92 21.0498 24.5876 20.7408 25.0995C20.5908 25.3471 20.3537 25.5216 20.0732 25.5908C19.7953 25.6619 19.5014 25.617 19.2528 25.467L15.9033 23.4429C15.7524 23.3523 15.6174 23.2373 15.502 23.1011C15.2215 22.769 15.0874 22.3482 15.1238 21.915C15.1602 21.4822 15.3626 21.0894 15.6946 20.8088ZM29.2608 22.7704L29.4464 20.7312L30.7763 21.8546L29.2608 22.7704ZM20.7399 22.7699L19.2236 21.8546L20.5534 20.7311L20.7399 22.7699Z" fill="white"/>
                                            <path d="M13.7246 18.7136C15.5171 18.7136 16.9748 17.2554 16.9748 15.4634C16.9748 13.6714 15.517 12.2137 13.7246 12.2137C11.9322 12.2137 10.4745 13.6715 10.4745 15.4634C10.4745 17.2554 11.9322 18.7136 13.7246 18.7136ZM13.7246 13.1228C15.0155 13.1228 16.0657 14.1726 16.0657 15.4634C16.0657 16.7543 15.0155 17.8045 13.7246 17.8045C12.4338 17.8045 11.3835 16.7543 11.3835 15.4634C11.3835 14.1726 12.4338 13.1228 13.7246 13.1228Z" fill="white"/>
                                            <path d="M6.024 26.5593L8.70335 28.1778C9.08865 28.4103 9.5414 28.4787 9.9782 28.3717C10.1602 28.3269 10.3306 28.2532 10.4842 28.1551L10.5011 28.3482L7.88925 39.3176C7.60515 40.5099 8.34465 41.7115 9.53695 41.9956C9.7101 42.0369 9.8823 42.0564 10.0519 42.0564C11.0578 42.0564 11.9722 41.3679 12.2154 40.3474L13.7246 34.0109L15.2338 40.347C15.4682 41.3364 16.3427 42.0391 17.3601 42.056C17.3618 42.056 17.3645 42.056 17.3672 42.056C17.6149 42.056 17.8173 41.8575 17.8217 41.609C17.8261 41.3577 17.6256 41.1509 17.3743 41.1469C16.7732 41.1371 16.2565 40.7221 16.118 40.137L14.1667 31.9437C14.0691 31.5344 13.3801 31.5344 13.2825 31.9437L11.3312 40.137C11.1634 40.8428 10.4434 41.2787 9.74825 41.1114C9.04245 40.9431 8.6057 40.2329 8.77345 39.528L11.4031 28.4863C11.4146 28.4383 11.4181 28.3886 11.4138 28.3398L11.2566 26.6233C11.2548 26.598 11.2531 26.5727 11.2495 26.5469L10.9184 22.9199C10.9033 22.7512 10.795 22.6047 10.6378 22.5408C10.4834 22.4769 10.3023 22.5044 10.1726 22.614L8.18845 24.2902C8.07655 24.3847 8.0171 24.5272 8.02865 24.6733C8.0402 24.8193 8.12095 24.9507 8.24615 25.0266L9.97555 26.0711C10.1531 26.178 10.2783 26.3481 10.328 26.5491C10.336 26.5815 10.3422 26.6139 10.3458 26.6468L10.3493 26.6854C10.36 26.8425 10.3218 26.9988 10.2392 27.1368C10.1318 27.3144 9.9622 27.4396 9.7607 27.4889C9.56005 27.5395 9.35145 27.5079 9.17385 27.4001L6.49365 25.7812C6.3818 25.7133 6.2815 25.6276 6.19535 25.5264C5.98675 25.2796 5.88645 24.9662 5.91395 24.644C5.9406 24.3217 6.0915 24.0292 6.3383 23.8206L9.7971 20.8989C10.5065 20.2987 11.4093 19.9685 12.3388 19.9685H15.114C15.3653 19.9685 15.5686 19.7652 15.5686 19.5139C15.5686 19.2627 15.3653 19.0594 15.114 19.0594H12.3388C11.1945 19.0594 10.083 19.466 9.21025 20.2046L5.75235 23.1263C5.31915 23.4916 5.05545 24.0034 5.0075 24.5676C4.96047 25.1322 5.13535 25.6809 5.50115 26.1133C5.65115 26.2908 5.82695 26.4408 6.024 26.5593ZM9.2591 24.5756L10.0927 23.8716L10.209 25.15L9.2591 24.5756Z" fill="white"/>
                                            <path d="M16.7883 25.0932C16.5441 25.0701 16.3169 25.2539 16.2938 25.5047L16.0345 28.3398C16.0301 28.3886 16.0337 28.4383 16.0452 28.4863L17.8953 36.2526C17.945 36.4617 18.1315 36.602 18.3374 36.602C18.3721 36.602 18.4076 36.5979 18.4431 36.5895C18.6872 36.5314 18.8382 36.2863 18.7796 36.0422L16.9472 28.3482L17.1994 25.5872C17.2224 25.3373 17.0377 25.1163 16.7883 25.0932Z" fill="white"/>
                                            <path d="M36.2759 18.7136C38.0684 18.7136 39.5261 17.2554 39.5261 15.4634C39.5261 13.6714 38.0684 12.2137 36.2759 12.2137C34.4835 12.2137 33.0257 13.6715 33.0257 15.4634C33.0257 17.2554 34.4835 18.7136 36.2759 18.7136ZM36.2759 13.1228C37.5668 13.1228 38.617 14.1726 38.617 15.4634C38.617 16.7543 37.5668 17.8045 36.2759 17.8045C34.9851 17.8045 33.9348 16.7543 33.9348 15.4634C33.9348 14.1726 34.9851 13.1228 36.2759 13.1228Z" fill="white"/>
                                            <path d="M44.2482 23.1263L40.7912 20.2046C39.9177 19.466 38.8062 19.0594 37.6618 19.0594H34.8867C34.6354 19.0594 34.4321 19.2627 34.4321 19.5139C34.4321 19.7652 34.6354 19.9685 34.8867 19.9685H37.6618C38.5914 19.9685 39.4942 20.2987 40.2044 20.8989L43.6614 23.8206C43.7626 23.9058 43.8488 24.0065 43.9171 24.1193C44.2616 24.691 44.0778 25.4363 43.5061 25.7812L40.8268 27.4001C40.6501 27.5079 40.4432 27.5395 40.2399 27.4889C40.0384 27.4396 39.8689 27.3144 39.7615 27.1369C39.6789 26.9988 39.6407 26.8426 39.6513 26.6854L39.6549 26.6464C39.6584 26.614 39.6646 26.5816 39.6726 26.5492C39.7224 26.3481 39.8476 26.1781 40.0251 26.0706L41.7537 25.0262C41.8788 24.9507 41.9596 24.8193 41.9711 24.6733C41.9827 24.5272 41.9232 24.3847 41.8114 24.2902L39.828 22.6141C39.6984 22.5044 39.5191 22.4769 39.3629 22.5408C39.2057 22.6047 39.0983 22.7512 39.0823 22.9199L38.7511 26.5469C38.7476 26.5722 38.7458 26.598 38.744 26.6237L38.5869 28.3398C38.5825 28.3886 38.586 28.4383 38.5976 28.4863L41.2263 39.528C41.3941 40.2334 40.9573 40.9436 40.2524 41.1114C39.5528 41.2818 38.8373 40.8419 38.6695 40.1371L36.7182 31.9437C36.6205 31.5345 35.9316 31.5345 35.8339 31.9437L33.8826 40.1371C33.7432 40.7217 33.2265 41.1371 32.6255 41.1469C32.3742 41.1509 32.1736 41.3577 32.1781 41.609C32.1825 41.8576 32.3849 42.056 32.6326 42.056C32.6352 42.056 32.6379 42.056 32.6397 42.056C33.6571 42.0391 34.5316 41.3369 34.7668 40.3475L36.2761 34.0109L37.7853 40.3475C38.0285 41.368 38.942 42.0564 39.9488 42.0564C40.1183 42.0564 40.2914 42.0369 40.4637 41.9956C41.656 41.7115 42.3946 40.5099 42.1105 39.3176L39.4995 28.3482L39.5164 28.1556C39.67 28.2532 39.8405 28.3269 40.0224 28.3718C40.4583 28.4787 40.912 28.4104 41.2973 28.1782L43.9767 26.5598C44.9763 25.9557 45.2995 24.6502 44.6949 23.6488C44.575 23.4512 44.4249 23.2755 44.2482 23.1263ZM39.9079 23.8716L40.7416 24.5756L39.7916 25.1496L39.9079 23.8716Z" fill="white"/>
                                            <path d="M31.5575 36.5895C31.593 36.598 31.6285 36.602 31.6631 36.602C31.8691 36.602 32.0555 36.4617 32.1053 36.2526L33.9554 28.4863C33.9669 28.4384 33.9705 28.3887 33.9661 28.3399L33.7068 25.5047C33.6846 25.2539 33.4574 25.0684 33.2123 25.0932C32.9629 25.1163 32.7782 25.3374 32.8013 25.5873L33.0534 28.3483L31.221 36.0422C31.1624 36.2864 31.3134 36.5314 31.5575 36.5895Z" fill="white"/>
                                        </svg>
                                    </Stack>
                                    <Stack className="steps-title  justify-content-center">
                                        <label className="text-uppercase">STEP 2</label>
                                        <span>Tailored Team Assembly</span>
                                    </Stack>
                                </Accordion.Header>
                                <Accordion.Body className="p-0">
                                    <p>
                                        Tailored team assembly is the strategic process of building customized teams that align with specific project requirements. By carefully selecting individuals based on their skills, experience, and expertise, organizations can ensure efficient collaboration and enhanced productivity.
                                    </p>
                                </Accordion.Body>
                            </Accordion.Item>
                            <Accordion.Item eventKey="2">
                                <Accordion.Header>
                                    <Stack className="steps-items align-items-center justify-content-center">
                                        <svg xmlns="http://www.w3.org/2000/svg" width="38" height="38" viewBox="0 0 38 38" fill="none">
                                            <path d="M5.7027 25.4818C9.2534 24.2707 12.1048 25.5412 14.6035 26.6395C15.5898 27.1026 16.5821 27.5064 17.4548 27.7379H20.7126C22.0516 27.7379 22.9243 28.492 22.751 29.7625L31.3588 25.3156C34.4433 23.7542 36.8881 27.3935 34.0906 29.2459L22.6315 36.8038C18.7938 39.0599 14.8365 37.6706 10.9391 36.3407C8.9605 35.7054 7.15525 35.0702 5.76245 35.0702C5.6489 35.8242 5.0631 36.4001 4.3099 36.4001H1.51235C0.6994 36.4001 0 35.7648 0 34.9574V25.7668C0 24.9594 0.6994 24.3241 1.51235 24.3241H4.3039C5.0033 24.3241 5.5891 24.8465 5.7027 25.4818ZM4.7164 28.1357H1.0461V34.9515C1.0461 35.183 1.21945 35.4146 1.51235 35.4146H4.3039C4.53705 35.4146 4.7104 35.183 4.7104 34.9515V28.1357H4.7164ZM2.3851 27.0967V25.3631H1.51235C1.2792 25.3631 1.0461 25.5353 1.0461 25.7668V27.0967H2.3851ZM3.3774 25.3631V27.0967H4.7164V25.7668C4.7164 25.5353 4.543 25.3631 4.3099 25.3631H3.3774ZM16.8151 4.1025H13.9041V6.8751H16.8151V4.1025ZM13.384 3.11695H17.3412C17.6341 3.11695 17.8673 3.3485 17.8673 3.6394V7.39755C17.8673 7.6885 17.6341 7.92005 17.3412 7.92005H13.384C13.0911 7.92005 12.858 7.6885 12.858 7.39755V3.6394C12.858 3.3485 13.0911 3.11695 13.384 3.11695ZM4.07675 13.863C3.3774 13.863 3.3774 12.8241 4.07675 12.8241H10.3593C10.9989 12.8241 10.9989 13.863 10.3593 13.863H4.07675ZM4.07675 16.8137C3.3774 16.8137 3.3774 15.8342 4.07675 15.8342H10.3593C10.9989 15.8342 10.9989 16.8137 10.3593 16.8137H4.07675ZM4.07675 19.8179C3.3774 19.8179 3.3774 18.7789 4.07675 18.7789H10.3593C10.9989 18.7789 10.9989 19.8179 10.3593 19.8179H4.07675ZM4.07675 10.9182C3.3774 10.9182 3.3774 9.87925 4.07675 9.87925H10.3593C10.9989 9.87925 10.9989 10.9182 10.3593 10.9182H4.07675ZM22.8048 19.236C22.8048 17.9061 21.7587 16.8078 20.4197 16.8078C19.0807 16.8078 17.9748 17.9061 17.9748 19.236C17.9748 20.566 19.0807 21.6049 20.4197 21.6049C21.7587 21.6109 22.8048 20.566 22.8048 19.236ZM23.8568 19.236C23.8568 21.0825 22.2847 22.6439 20.4256 22.6439C18.5068 22.6439 16.9945 21.0825 16.9945 19.236C16.9945 17.3302 18.5068 15.8282 20.4256 15.8282C22.2847 15.8282 23.8568 17.3302 23.8568 19.236ZM25.2496 20.3938C25.1898 20.566 25.3094 20.7975 25.5425 20.9163L26.7082 21.6109L25.6621 23.4573L24.4965 22.7626C24.2633 22.6498 24.0302 22.6499 23.8568 22.8221C23.277 23.3445 22.6374 23.7482 21.8783 23.9797C21.6451 24.0392 21.4718 24.2113 21.4718 24.5023V25.8915H19.3796V24.5023C19.3796 24.2113 19.2063 24.0392 18.9731 23.9797C18.214 23.7482 17.5205 23.3445 16.9945 22.8221C16.8211 22.6499 16.5282 22.6498 16.3549 22.7626L15.1355 23.4573L14.0893 21.6109L15.3088 20.9163C15.4822 20.8034 15.6017 20.5719 15.5419 20.3938C15.3686 19.6398 15.3686 18.8323 15.5419 18.0842C15.6017 17.8527 15.4822 17.6212 15.3088 17.5084L14.0893 16.8137L15.1355 15.0208L16.3549 15.656C16.5282 15.8282 16.8211 15.7688 16.9945 15.5966C17.5205 15.0742 18.214 14.6705 18.9731 14.4983C19.2063 14.4389 19.3796 14.2073 19.3796 13.9758V12.5865H21.4718V13.9758C21.4718 14.2073 21.6451 14.4389 21.8783 14.4983C22.6374 14.6705 23.277 15.0742 23.8568 15.5966C24.0302 15.7688 24.2633 15.8282 24.4965 15.656L25.6621 15.0208L26.7082 16.8137L25.5425 17.5084C25.3094 17.6212 25.1958 17.8527 25.2496 18.0842C25.423 18.8323 25.423 19.6457 25.2496 20.3938ZM19.8997 11.5535H18.8535C18.5606 11.5535 18.3275 11.7851 18.3275 12.076V13.6374C17.6879 13.8689 17.108 14.2133 16.5222 14.6171L15.243 13.863C14.9501 13.7502 14.6632 13.8036 14.5436 14.0352L12.9715 16.7484C12.7982 16.98 12.9117 17.3244 13.1449 17.4431L14.4839 18.1971C14.3703 18.8917 14.3703 19.5863 14.4839 20.2216L13.1449 21.0291C12.9117 21.1419 12.7982 21.4327 12.9715 21.7237L13.2645 22.1868H2.3313C1.86505 22.1868 1.51835 21.8425 1.51835 21.3794V6.2933L6.2885 1.03305H19.0867C19.5529 1.03305 19.8997 1.3774 19.8997 1.8405V11.5535ZM24.3231 14.5576L24.2633 14.6171C23.7373 14.2133 23.1575 13.863 22.5179 13.6374V12.076C22.5179 11.7851 22.2847 11.5535 21.9918 11.5535H20.9457V1.8464C20.9457 0.80745 20.073 0 19.0867 0H6.05535C5.882 0 5.70865 0.1128 5.6489 0.23155L0.6456 5.77675C0.52605 5.88955 0.46625 6.0083 0.46625 6.1211V21.3734C0.46625 22.4124 1.2792 23.2198 2.3253 23.2198H13.7845H13.8442L14.5436 24.3776C14.6572 24.6091 14.9501 24.7219 15.243 24.5497L16.5222 23.7957C17.1021 24.2588 17.6879 24.6031 18.3275 24.8347V26.3368C18.3275 26.6277 18.5606 26.8592 18.8535 26.8592H21.9978C22.2907 26.8592 22.5238 26.6277 22.5238 26.3368V24.8347C23.1635 24.6031 23.7432 24.2588 24.2693 23.7957L25.6083 24.5497C25.8414 24.7219 26.1882 24.6091 26.3077 24.3776L27.8798 21.7178C27.9934 21.4269 27.9396 21.1418 27.7065 21.0231L26.3675 20.2157C26.4811 19.5804 26.4811 18.8857 26.3675 18.2505C27.6467 19.4616 29.3324 20.1563 31.1376 20.1563C34.9215 20.1563 38 17.0928 38 13.3405C38 9.52895 34.9155 6.46545 31.1376 6.46545C27.3 6.46545 24.2155 9.52895 24.2155 13.3405C24.2036 13.7502 24.2633 14.1539 24.3231 14.5576ZM27.2282 17.6805L27.6945 17.449C27.9277 17.3362 27.9874 16.9859 27.8679 16.7544L26.2957 14.0411C26.1821 13.8096 25.8295 13.7502 25.5963 13.8689L25.3034 14.0411C25.2437 13.8096 25.2437 13.5781 25.2437 13.3465C25.2437 10.1108 27.8619 7.5104 31.1197 7.5104C34.3178 7.5104 36.936 10.1108 36.936 13.3465C36.936 16.5229 34.3178 19.1232 31.1197 19.1232C29.6731 19.1232 28.3341 18.6008 27.2282 17.6805ZM7.3346 4.6784H6.2885V3.6988H7.3346V4.6784ZM7.3346 6.75635H6.2885V5.7174H7.3346V6.75635ZM7.3346 2.65385H6.2885V1.67425H7.3346V2.65385ZM5.2962 5.7174V6.75635H4.2501V5.7174H5.2962ZM3.25785 5.7174V6.75635H2.21175V5.7174H3.25785ZM33.0445 11.6129L30.6595 13.5781C30.4263 13.7502 30.1334 13.7502 29.96 13.5187L29.2607 12.7647C28.7944 12.2422 27.9815 12.9962 28.4477 13.5187L29.8465 15.0208C30.0198 15.2523 30.3725 15.3116 30.6057 15.0801L33.7499 12.4203C34.3835 11.8979 33.6303 11.0904 33.0445 11.6129ZM30.3725 12.5331L32.4647 10.7995C33.977 9.58835 35.9557 11.8385 34.3835 13.1684L31.2393 15.8282C30.5996 16.3506 29.7269 16.2913 29.1471 15.7154C28.6808 15.1929 28.2145 14.6764 27.7483 14.2133C26.1762 12.7113 28.4477 10.6332 29.96 12.1353L30.3725 12.5331ZM17.395 28.7175C17.3352 28.7175 17.2814 28.7175 17.2216 28.7175C16.2353 28.486 15.2431 28.0822 14.197 27.5598C11.7521 26.5208 9.0203 25.3038 5.76245 26.5802V34.0905C7.3346 34.0312 9.2534 34.7258 11.2918 35.4204C14.3763 36.4001 19.0867 38.0802 22.0576 35.9963L33.5168 28.4266C35.2622 27.2689 33.7499 25.2503 31.8311 26.2299L22.1173 31.1992C21.4777 32.0066 20.4317 32.6419 19.0329 32.6419H12.577C12.2841 32.6419 12.1108 32.4104 12.1108 32.1194C12.1108 31.8879 12.2841 31.6564 12.577 31.6564H19.0329C20.2523 31.6564 21.125 30.9618 21.5375 30.2671C22.0037 29.4597 21.8304 28.7057 20.7246 28.7057H17.395V28.7175Z" fill="white"/>
                                        </svg>
                                    </Stack>
                                    <Stack className="steps-title  justify-content-center">
                                        <label className="text-uppercase">STEP 3</label>
                                        <span>Seamless Project Execution</span>
                                    </Stack>
                                </Accordion.Header>
                                <Accordion.Body className="p-0">
                                    <p>
                                        Seamless project execution refers to the smooth and efficient management of tasks, resources, and timelines to deliver successful project outcomes. It involves clear planning, effective communication, and proactive problem-solving to ensure every phase of the project runs without disruptions.
                                    </p>
                                </Accordion.Body>
                            </Accordion.Item>
                        </Accordion>
                        <Button onClick={handleShow} className="default-btn-style border-0 book-consultation">
                            <span>Book a Consultation</span>
                            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none">
                                <path d="M7.73923 0.335938C7.95004 0.148438 8.14913 0.148438 8.33651 0.335938L15.6796 7.71875C15.8904 7.90625 15.8904 8.09375 15.6796 8.28125L8.33651 15.6641C8.14913 15.8516 7.95004 15.8516 7.73923 15.6641L7.03655 14.9609C6.96628 14.8906 6.93115 14.7969 6.93115 14.6797C6.93115 14.5625 6.96628 14.457 7.03655 14.3633L12.4823 8.91406H0.501596C0.220523 8.91406 0.0799866 8.77344 0.0799866 8.49219V7.50781C0.0799866 7.22656 0.220523 7.08594 0.501596 7.08594H12.4823L7.03655 1.63672C6.84917 1.42578 6.84917 1.22656 7.03655 1.03906L7.73923 0.335938Z" fill="white"/>
                            </svg>
                        </Button>
                        <Modal show={show} onHide={handleClose} backdrop="static" keyboard={false} className="get-in-touch mt-0 mb-0" size="lg" centered>
                            <Modal.Header closeButton>
                                <Modal.Title>Get In Touch</Modal.Title>
                            </Modal.Header>
                            <Modal.Body>
                                <Form onSubmit={handleHireDeveloperForm} autoComplete="off" className="form-container">
                                    <Row>
                                        <Form.Group as={Col} className="mb-3">
                                            <ListGroupItem className={`form-field ${errors.name ? "is-invalid" : ""}`}>
                                                <Form.Label>Full Name</Form.Label>
                                                <Form.Control
                                                    type="text"
                                                    placeholder=""
                                                    value={hiredeveloperform.name}
                                                    onChange={handleChange}
                                                    onInput={handlelabel}
                                                    name="name"
                                                    onFocus={handleFocus} autoComplete="off"
                                                    isInvalid={!!errors.name}
                                                />
                                            </ListGroupItem>
                                            <Form.Control.Feedback type="invalid">{errors.name}</Form.Control.Feedback>
                                        </Form.Group>
                                        <Form.Group as={Col} className="mb-3">
                                            <ListGroupItem className={`form-field ${errors.email ? "is-invalid" : ""}`}>
                                                <Form.Label>Email Address</Form.Label>
                                                <Form.Control
                                                    type="text"
                                                    placeholder=""
                                                    value={hiredeveloperform.email}
                                                    onChange={handleChange}
                                                    name="email"
                                                    onFocus={handleFocus} onInput={handlelabel} autoComplete="off"
                                                    isInvalid={!!errors.email}
                                                />
                                            </ListGroupItem>
                                            <Form.Control.Feedback type="invalid">{errors.email}</Form.Control.Feedback>
                                        </Form.Group>
                                    </Row>
                                    <Row>
                                        <Form.Group as={Col} className="mb-3">
                                            <ListGroupItem className={`form-field ${errors.phoneNumber ? "is-invalid" : ""}`}>
                                                <Form.Label>Phone Number</Form.Label>
                                                <Form.Control
                                                    type="text"
                                                    placeholder=""
                                                    value={hiredeveloperform.phoneNumber}
                                                    onChange={handleChange}
                                                    name="phoneNumber"
                                                    onFocus={handleFocus} onInput={handlelabel} autoComplete="off"
                                                    isInvalid={!!errors.phoneNumber}
                                                />
                                            </ListGroupItem>
                                            <Form.Control.Feedback type="invalid">{errors.phoneNumber}</Form.Control.Feedback>
                                        </Form.Group>
                                    </Row>
                                    <Row>
                                        <Form.Group as={Col} md="12" className="mb-3">
                                            <ListGroupItem className={`form-field ${errors.service ? "is-invalid" : ""}`}>
                                                <Form.Label>Select Your Service</Form.Label>
                                                <Form.Select defaultValue="Choose..." name="service" value={hiredeveloperform.service} onChange={handleChange} onFocus={handleFocus} isInvalid={!!errors.service}>
                                                    <option value="">Please Select from the dropdown</option>
                                                    <option value="">Please Select from the dropdown</option>
                                                    <option value="Php Developers">Php Developers</option>
                                                    <option value="React Js Developers">React Js Developers</option>
                                                    <option value="Angular Js Developers">Angular Js Developers</option>
                                                    <option value="Node Js Developers">Node Js Developers</option>
                                                    <option value="Laravel Developers">Laravel Developers</option>
                                                    <option value="Android Developers">Android Developers</option>
                                                    <option value="Magento Developers">Magento Developers</option>
                                                    <option value="Wordpress Developers">Wordpress Developers</option>
                                                    <option value="Other">Other</option>
                                                </Form.Select>
                                            </ListGroupItem>
                                            <Form.Control.Feedback type="invalid">{errors.service}</Form.Control.Feedback>
                                        </Form.Group>
                                        <Form.Group as={Col} className="mb-3">
                                            <ListGroupItem className={`form-field ${errors.requirements ? "is-invalid" : ""}`}>
                                                <Form.Label>Describe Your Requirements</Form.Label>
                                                <Form.Control
                                                    type="text"
                                                    as="textarea"
                                                    placeholder=""
                                                    value={hiredeveloperform.requirements}
                                                    onChange={handleChange}
                                                    name="requirements"
                                                    onFocus={handleFocus} onInput={handlelabel} autoComplete="off"
                                                    isInvalid={!!errors.requirements}
                                                />
                                            </ListGroupItem>
                                            <Form.Control.Feedback type="invalid">{errors.requirements}</Form.Control.Feedback>
                                        </Form.Group>
                                        <Form.Group className="captcha mb-3">
                                            <ListGroupItem className={`form-field ${errors.captchaToken ? "is-invalid" : ""}`}>
                                                <ReCAPTCHA
                                                        sitekey={process.env.REACT_APP_RECAPTCHA_SITE_KEY!}
                                                        onChange={handleCaptchaChange}
                                                />
                                            </ListGroupItem>
                                            {errors.captchaToken ? (
                                                <Form.Control.Feedback type="invalid">
                                                {errors.captchaToken}
                                                </Form.Control.Feedback>
                                            ) : null}
                                        </Form.Group>
                                    </Row>
                                    <Button variant="primary" type="submit" className={`btn btn-primary default-btn-style border-0 ${loading ? "loading" : ""}`}>
                                        {loading ? "Submitting..." : "Send Query"}
                                        <span></span>
                                    </Button>
                                </Form>
                            </Modal.Body>
                        </Modal>
                    </Stack>
                </Col>
            </Row>
        </Container>
    )
}


export default HomeOurProcess