// 📌 components/Common/GetMyAdStatus.jsx
import {
MdAirplanemodeInactive,
MdOutlineDone,
MdOutlineLiveTv,
MdOutlineSell,
} from "react-icons/md";
import { BiBadgeCheck } from "react-icons/bi";
import { RxCross2 } from "react-icons/rx";
import { RiPassExpiredLine } from "react-icons/ri";
import { IoTimerOutline } from "react-icons/io5";
import { t } from "@/utils";
const GetMyAdStatus = ({
status,
isApprovedSort = false,
isFeature = false,
isJobCategory = false,
}) => {
const statusComponents = {
approved: isApprovedSort
? { icon: , text: t("live") }
: isFeature
? { icon: , text: t("featured") }
: { icon: , text: t("live") },
review: {
icon: ,
text: t("review"),
},
"permanent rejected": {
icon: ,
text: t("permanentRejected"),
bg: "bg-red-600",
},
"soft rejected": {
icon: ,
text: t("softRejected"),
bg: "bg-red-500",
},
inactive: {
icon: ,
text: t("deactivate"),
bg: "bg-gray-500",
},
"sold out": {
icon: ,
text: isJobCategory ? t("positionFilled") : t("soldOut"),
bg: "bg-yellow-600",
},
resubmitted: {
icon: ,
text: t("resubmitted"),
bg: "bg-green-600",
},
expired: {
icon: ,
text: t("expired"),
bg: "bg-gray-700",
},
};
const { icon, text, bg = "bg-primary" } = statusComponents[status] || {};
if (!status) return null;
return (
{icon}
{text}
);
};
export default GetMyAdStatus;