import { FC, useEffect, useState } from "react";
import Footer from "../components/home/footer/Footer";
import InternalPageHeader from "../components/internalPageHeader/InternalPageHeader";
import * as CategoryAPI from "./api/category";
import styles from "./fotterPage.module.scss";
import MediaQuery from "react-responsive";
import MobileHeader from "../components/home/mobile/mobileHeader/MobileHeader";
import MobileFooter from "../components/home/mobile/mobileFooter/MobileFooter";
import cx from "classnames";
import { baseUrl } from "../constants/urls";
import * as commonAPI from "./api/common";
import SEOHead from "../components/SEOHead";
import { seoDataMap } from "../mockData/seoData";
import Script from "next/script";
const seoData = seoDataMap["refundAndCancellation"];

const RefundAndCancellation: FC<any> = () => {
  const [category, setCategory] = useState([]);
  const [categoryTree, setCategoryTree] = useState([]);
  const [stateArray, setStateArray] = useState([]);
  useEffect(() => {
    CategoryAPI.fetchCategory().then((res) => {
      setCategory(res);
    });
    CategoryAPI.fetchCategoryTree().then((res) => {
      setCategoryTree(res.categories);
    });
    commonAPI.getRequest(`${baseUrl}/api/indian-states`).then((res) => {
      setStateArray(res?.data);
    });
  }, []);
  return (
    <>
      <SEOHead {...seoData} />
      <Script
        src="https://alique.unboundai.me/widget.js"
        strategy="afterInteractive"
        onLoad={() => {
          if (typeof window.initChatbot === "function") {
            window.initChatbot({
              id: "indie-spare-bot-1",
              baseUrl: "https://alique.unboundai.me",
              position: "bottom-right",
              theme: {
                primaryColor: "#291C61",
                backgroundColor: "#ffffff",
                textColor: "#1f2937",
              },
            });
          } else {
            console.error("initChatbot not available after script load");
          }
        }}
      />
      <MediaQuery maxWidth={768}>
        <MobileHeader stateArray={stateArray} />
      </MediaQuery>
      <MediaQuery minWidth={769}>
        <InternalPageHeader
          catagories={category}
          categoryTree={categoryTree}
          stateArray={stateArray}
        />
      </MediaQuery>
      <div className={cx("container", styles.mobileView)}>
        <>
          <h2 className={styles.aboutUsTitle}>
            Refund, returns and Cancellations
          </h2>
          <ol className="gmail-ol1">
            <li className="gmail-li1">
              <strong>Cancellation</strong>
            </li>
          </ol>
          <p className="gmail-p2">
            The right to cancel any order for any reason is reserved with
            Indispare/seller of the goods. Possible reasons for cancellation
            include, but are not limited to the following-
          </p>
          <ol className="gmail-ol2">
            <li className="gmail-li3">
              (i)<strong>Potentially fraudulent order -</strong>&nbsp;Before
              shipping the orders, a check is run to make sure such orders are
              legitimate. If the check fails, Your order may be cancelled
            </li>
            <li className="gmail-li3">
              (ii)<strong>Incorrect Pricing -</strong>&nbsp;Due to the volatile
              market for collectible product, there may be major fluctuations in
              price at times. Therefore, the seller reserves the right to remove
              any item from any order and provide a full refund to the customer
              tor that item.
            </li>
            <li className="gmail-li3">
              (iii)<strong>Non-Payment of Non-COD -orders -</strong>&nbsp;If
              payment is not received within a reasonable amount of time after
              the order has been placed. Your order may get cancelled without
              notice
            </li>
            <li className="gmail-li3">
              (iv)<strong>Non availability of the product -</strong>&nbsp;If the
              order is not serviceable by the seller due to non-availability of
              the product.
            </li>
            <li className="gmail-li3">
              (v)<strong>Non-serviceable address -</strong> If Your pin code is
              not serviced by any of the courier partners, your order will be
              cancelled.
            </li>
            <li className="gmail-li3">
              (vi)<strong>Long gestation time -</strong>&nbsp;If the procurement
              is taking longer than 7 working days and You are not willing to
              wait further, your order will be cancelled.
            </li>
          </ol>
          <p className="gmail-p4">&nbsp;</p>
          <ol className="gmail-ol1">
            <li className="gmail-li1">
              <strong>Return &amp; Refund Policy</strong>
            </li>
          </ol>
          <p className="gmail-p5">
            <span className="gmail-s1">
              Most items purchased from sellers listed on our website are
              returnable within the return window, except those that are
              explicitly identified as not returnable{" "}
            </span>
            (please review the terms before placing your order). All returns are
            further subject to the terms, conditions, and policies of our
            payment service providers. Please contact our office to discuss any
            return requests - or email us at{" "}
            <span className="gmail-s2">
              <strong>
                <a href="mailto:contact@indispare.com">contact@indispare.com</a>
              </strong>
            </span>
            .
          </p>
          <p className="gmail-p5">
            <span className="gmail-s1">The return is processed only if:</span>
          </p>
          <ol className="gmail-ol2">
            <li className="gmail-li3">
              it is determined that the product was not damaged while in your
              possession.
            </li>
            <li className="gmail-li3">
              the product is not different from what was shipped to you.
            </li>
            <li className="gmail-li3">
              the product is returned in original condition (with
              brand’s/manufacturer's box, MRP tag intact, user manual, warranty
              card and accessories)
            </li>
          </ol>
          <p className="gmail-p6">&nbsp;</p>
          <p className="gmail-p7">
            For the products that are returned by the customer, the refund is
            issued to the original payment method (in case of pre-paid
            transactions) or to the bank account in case of Pay on Delivery
            orders, the details for making such refund and the timelines are
            detailed in the refund policy.
          </p>
        </>
      </div>
      {/* <div className="container  my-20">
        <h2 className={styles.title}>Refund, returns and Cancellations</h2>
        <h3 className={styles.textUnderline}>Return and Refund Policy</h3>
        <p>Last updated: August 18, 2022</p>
        <p>Thank you for shopping at Indispare website and Indispare app.</p>
        <p>
          If, for any reason, You are not completely satisfied with a purchase
          We invite
        </p>
        <p>You to review our policy on refunds and returns.</p>
        <p>
          The following terms are applicable for any products that You purchased
          with Us.
        </p>
        <h3 className={styles.textUnderline}>
          Interpretation and Definitions{" "}
        </h3>
        <div className="px-2">
          <h5 className="py-3" style={{ textDecorationLine: "underline" }}>
            Interpretation
          </h5>
          <p>
            The words of which the initial letter is capitalized have meanings
            defined under the following conditions. The following definitions
            shall have the same meaning regardless of whether they appear in
            singular or in plural.
          </p>
          <h5 className="py-3" style={{ textDecorationLine: "underline" }}>
            Definitions
          </h5>
          <div>For the purposes of this Return and Refund Policy:</div>
          <ul className={styles.refundList}>
            <li>
              Application means the software program provided by the Company
              downloaded by You on any electronic device, named Indispare.
            </li>
            <li>
              {" "}
              Company (referred to as either "the Company", "We", "Us" or "Our"
              in this Agreement) refers to Indispare Seller Services Private
              Limited , Durgam Cheruvu, Hyderabad.
            </li>
            <li>Goods refer to the items offered for sale on the Service.</li>
            <li>Orders mean a request by You to purchase Goods from Us.</li>
            <li>Service refers to the Application or the Website or both.</li>
            <li>
              Website refers to Indispare, accessible from {'<'}http://indispare.com{"/>"}
            </li>
            <li>
              You means the individual accessing or using the Service, or the
              company, or other legal entity on behalf of which such individual
              is accessing or using the Service, as applicable.
            </li>
          </ul>
        </div>
        <h3 className={styles.textUnderline}>Your Order Cancellation Rights</h3>
        <p>
          You are entitled to cancel Your Order within 7 days without giving any
          reason for doing so.
        </p>
        <p>
          The deadline for cancelling an Order is 7 days from the date on which
          You received the Goods or on which a third party you have appointed,
          who is not the carrier, takes possession of the product delivered.
        </p>
        <p>
          In order to exercise Your right of cancellation, You must inform Us of
          your decision by means of a clear statement. You can inform us of your
          decision by:
        </p>
        <p className="pl-2"> * By email: contact@indispare.com</p>
        <p>
          We will reimburse You no later than 14 days from the day on which We
          receive the returned Goods. We will use the same means of payment as
          You used for the Order, and You will not incur any fees for such
          reimbursement.
        </p>
        <h3 className={styles.textUnderline}>Conditions for Returns </h3>
        <p>
          In order for the Goods to be eligible for a return, please make sure
          that:
        </p>
        <ul className={styles.startList}>
          <li>The Goods were purchased in the last 7 days</li> 
          <li>The Goods are in the original packaging</li>
        </ul>
        <p>The following Goods cannot be returned:</p>
        <p>
          {" "}
          * The supply of Goods made to Your specifications or clearly
          personalized.
          <br />
          * The supply of Goods which according to their nature are not suitable
          to be returned, deteriorate rapidly or where the date of expiry is
          over.
          <br />
          * The supply of Goods which are not suitable for return due to health
          protection or hygiene reasons and were unsealed after delivery.
          <br />* The supply of Goods which are, after delivery, according to
          their nature, inseparably mixed with other items.
        </p>
        <p>
          We reserve the right to refuse returns of any merchandise that does
          not meet the above return conditions in our sole discretion.
        </p>
        <p>
          Only regular priced Goods may be refunded. Unfortunately, Goods on
          sale cannot be refunded. This exclusion may not apply to You if it is
          not permitted by applicable law.
        </p>
        <h3 className={styles.textUnderline}>Returning Goods </h3>
        <p>
          You are responsible for the cost and risk of returning the Goods to
          Us. You should send the Goods at the following address:
          <br />
          <br />
          <br />
          Durgam Cheruvu, Hyderabad
        </p>
        <p>
          We cannot be held responsible for Goods damaged or lost in return
          shipment. Therefore, We recommend an insured and trackable mail
          service. We are unable to issue a refund without actual receipt of the
          Goods or proof of received return delivery.
        </p>
        <h3 className={styles.textUnderline}>Gifts</h3>
        <p>
          If the Goods were marked as a gift when purchased and then shipped
          directly to you, You'll receive a gift credit for the value of your
          return. Once the returned product is received, a gift certificate will
          be mailed to You.
        </p>
        <p>
          If the Goods weren't marked as a gift when purchased, or the gift
          giver had the Order shipped to themselves to give it to You later, We
          will send the refund to the gift giver.
        </p>
        <h3 className={styles.textUnderline}>Contact Us </h3>
        <p>
          If you have any questions about our Returns and Refunds Policy, please
          contact us:
        </p>
        <p className="pl-2"> * By email: contact@indispare.com</p>
      </div> */}
      <Footer stateArray={stateArray} />
      <MediaQuery maxWidth={768}>
        <MobileFooter stateArray={stateArray} />
      </MediaQuery>
    </>
  );
};

export default RefundAndCancellation;
