import React, { useState } from "react"; import { Button } from "../ui/button"; import { Reveal } from "./Reveal"; import { Icon } from "@iconify/react/dist/iconify.js"; import { Link } from "@/i18n/routing"; import { useTranslations } from "next-intl"; import { usePathname } from "next/navigation"; import Image from "next/image"; const regions = [ { name: "SIBER", slug: "siber", logo: "/assets/satker/siber.png" }, { name: "DIVKUM", slug: "divkum", logo: "/assets/satker/divkum.png" }, { name: "PUSKEU", slug: "puskeu", logo: "/assets/satker/puskeu.png" }, { name: "YANMA", slug: "yanma", logo: "/assets/satker/logo-yanma.png" }, { name: "SSDM", slug: "ssdm", logo: "/assets/satker/ssdm.png" }, { name: "ITWASUM", slug: "itwasum", logo: "/assets/satker/itwasum.png" }, { name: "STIK-PTIK", slug: "stik-ptik", logo: "/assets/satker/stik-ptik.png" }, { name: "SATUAN KERJA POLRI", slug: "satuan-kerja-polri", logo: "/assets/satker/satuan-kerja-polri.png" }, { name: "BRIMOB", slug: "brimob", logo: "/assets/satker/brimob.png" }, { name: "DIV HUMAS", slug: "div-humas", logo: "/assets/satker/div-humas.png" }, { name: "PUSLITBANG", slug: "puslitbang", logo: "/assets/satker/puslitbang.png" }, { name: "BINMAS", slug: "binmas", logo: "/assets/satker/binmas.png" }, { name: "DIV TIK", slug: "div-tik", logo: "/assets/satker/div-tik.png" }, { name: "SPRIPIM", slug: "spripim", logo: "/assets/satker/spripim.png" }, { name: "DIVPROPRAM", slug: "divpropram", logo: "/assets/satker/div-propram.png" }, { name: "KORPS SABHARA BAHARKAM", slug: "korps-sabhara-baharkam", logo: "/assets/satker/khorp-sabhara-baharkam.png" }, { name: "PUSDOKKES", slug: "pusdokkes", logo: "/assets/satker/pusdokkes.png" }, { name: "BAHARKAM", slug: "baharkam", logo: "/assets/satker/baharkam.png" }, { name: "POLAIRUD", slug: "polairud", logo: "/assets/satker/polairud.png" }, { name: "POLAIR", slug: "polair", logo: "/assets/satker/polair.png" }, { name: "POLUDARA", slug: "poludara", logo: "/assets/satker/poludara.png" }, { name: "LEMDIKLAT", slug: "lemdiklat", logo: "/assets/satker/lemdiklat.png" }, { name: "AKPOL", slug: "akpol", logo: "/assets/satker/akpol.png" }, { name: "KORLANTAS", slug: "korlantas", logo: "/assets/satker/korlantas.png" }, { name: "PUSINAFIS", slug: "pusinafis", logo: "/assets/satker/pusinafis.png" }, { name: "PUSJARAH", slug: "pusjarah", logo: "/assets/satker/pusjarah.png" }, { name: "PUSIKNAS", slug: "pusiknas", logo: "/assets/satker/pusiknas.png" }, { name: "SLOG", slug: "slog", logo: "/assets/satker/slog.png" }, { name: "BAINTELKAM", slug: "baintelkam", logo: "/assets/satker/baintelkam.jpg" }, { name: "BARESKRIM", slug: "bareskrim", logo: "/assets/satker/bareskrim.png" }, { name: "DIVHUBINTER", slug: "divhubinter", logo: "/assets/satker/divhubinter.png" }, { name: "SETUM", slug: "setum", logo: "/assets/satker/setum.png" }, { name: "PUSLABFOR", slug: "puslabfor", logo: "/assets/satker/puslabfor.png" }, { name: "DENSUS 88", slug: "densus-88", logo: "/assets/satker/densus88.png" }, { name: "SAHLI KAPOLRI", slug: "sahli-kapolri", logo: "/assets/satker/sahli-kapolri.png" }, { name: "SOPS", slug: "sops", logo: "/assets/satker/sops.png" }, { name: "SRENA", slug: "srena", logo: "/assets/satker/srena.png" }, { name: "SESPIM POLRI", slug: "sespim-polri", logo: "/assets/satker/sespim-polri.png" }, { name: "SETUPA POLRI", slug: "setupa-polri", logo: "/assets/satker/setupa-polri.png" }, ]; const Division = () => { const [searchTerm, setSearchTerm] = useState(""); const [seeAllValue, setSeeAllValue] = useState(false); const [filteredList, setFilteredList] = useState(regions); const pathname = usePathname(); const t = useTranslations("LandingPage"); const handleSearch = () => { const value = searchTerm.toLowerCase(); const filtered = regions.filter((satker) => satker.name.toLowerCase().includes(value)); setFilteredList(filtered); }; const shimmer = (w: number, h: number) => ` `; const toBase64 = (str: string) => (typeof window === "undefined" ? Buffer.from(str).toString("base64") : window.btoa(str)); return (
{/* Header */} {/* */} {/*

{pathname?.split("/")[1] == "in" ? ( <> {t("coverageOnly")} {t("division")}{" "} ) : ( <> {t("division")}  {t("coverageOnly")} )}

*/} {/*
*/} {/* Pencarian */} {/*
setSearchTerm(e.target.value)} type="text" placeholder={t("search")} className="w-4/5 px-4 py-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-[#bb3523] focus:outline-none" />
*/} {/* Grid Wilayah */}
{filteredList?.map((region: any) => (
{region.name}

{region.name}

))}
{/* {filteredList && filteredList.length > 9 && (
)} */} {/*
*/}
); }; export default Division;