'use client'
import { motion } from "framer-motion"
import { EyeOff, Eye, Hammer, RefreshCw, ShieldBan, User, Swords, SkipForward, BowArrow, Info, RouteIcon, Search } from "lucide-react"
import useGlobalStore from '@/stores/globalStore'
import { useTranslations } from "next-intl"
import { getLocaleName, getNameChar } from "@/helper"
import useLocaleStore from "@/stores/localeStore"
import SelectCustomImage from "../select/customSelectImage"
import { useMemo, useState } from "react"
import useDetailDataStore from "@/stores/detailDataStore"
export default function ExtraSettingBar() {
const { extraData, setExtraData, isEnableChangePath, setIsEnableChangePath } = useGlobalStore()
const transI18n = useTranslations("DataPage")
const { mapAvatar, mapPeak, stage, baseType } = useDetailDataStore()
const { locale } = useLocaleStore()
const [showSearchStage, setShowSearchStage] = useState(false)
const [isChildClick, setIsChildClick] = useState(false)
const [stageSearchTerm, setStageSearchTerm] = useState("")
const [stagePage, setStagePage] = useState(1)
const pageSize = 30
const stageList = useMemo(() => Object.values(stage), [stage])
const term = stageSearchTerm.toLowerCase()
const filteredStages = useMemo(() => stageList.filter((s) =>
getLocaleName(locale, s.Name).toLowerCase().includes(term) ||
String(s.ID).toLowerCase().includes(term)
), [stageList, term, locale])
const paginatedStages = useMemo(() => filteredStages.slice(
(stagePage - 1) * pageSize,
stagePage * pageSize
), [filteredStages, stagePage, pageSize])
const hasMorePages = useMemo(() => stagePage * pageSize < filteredStages.length, [stagePage, filteredStages])
const onChangeSearch = (v: string) => {
setStageSearchTerm(v)
setStagePage(1)
}
return (
{extraData?.theory_craft && (
{transI18n("theoryCraft")}
{extraData?.theory_craft?.mode && (
<>
>
)}
)}
{/*MULTIPATH CHAR */}
{transI18n("multipathCharacter")}
setIsEnableChangePath(e.target.checked)}
/>
{isEnableChangePath && (
<>
>
)}
{/* CHALLENGE */}
{transI18n("challenge")}
{/*EXTRA FEATURES */}
)
}