/* eslint-disable @typescript-eslint/restrict-template-expressions */ /* eslint-disable @typescript-eslint/prefer-optional-chain */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/restrict-plus-operands */ /* eslint-disable @typescript-eslint/no-unsafe-return */ /* eslint-disable react/prop-types */ import { useNavigate } from 'react-router-dom' import { RichTextEditor } from '#components/Input/RichTextEditor' import { useUpdateItem } from '#components/Map/hooks/useItems' import { PopupStartEndInput, TextView } from '#components/Map/Subcomponents/ItemPopupComponents' import { ActionButton } from '#components/Profile/Subcomponents/ActionsButton' import { LinkedItemsHeaderView } from '#components/Profile/Subcomponents/LinkedItemsHeaderView' import { TagsWidget } from '#components/Profile/Subcomponents/TagsWidget' import { Tabs } from '#components/Templates/Tabs' export const TabsForm = ({ item, state, setState, updatePermission, linkItem, unlinkItem, loading, setUrlParams, }) => { const updateItem = useUpdateItem() const navigate = useNavigate() return (
{item.layer.itemType.show_start_end_input && ( setState((prevState) => ({ ...prevState, end: e, })) } updateStartValue={(s) => setState((prevState) => ({ ...prevState, start: s, })) } > )} setState((prevState) => ({ ...prevState, text: v, })) } containerStyle='tw:pt-2 tw:flex-1 tw:min-h-36 tw:max-h-136' /> setState((prevState) => ({ ...prevState, contact: c, })) } containerStyle='tw:pt-2 tw:h-36 tw:flex-none' showMenu={false} />
), }, { title: 'Offers & Needs', component: (
setState((prevState) => ({ ...prevState, offers: v, })) } placeholder='enter your offers' containerStyle='tw:bg-transparent tw:w-full tw:h-full tw:mt-3 tw:text-xs tw:h-[calc(100%-1rem)] tw:min-h-[5em] tw:pb-2 tw:overflow-auto' />
setState((prevState) => ({ ...prevState, needs: v, })) } placeholder='enter your needs' containerStyle='tw:bg-transparent tw:w-full tw:h-full tw:mt-3 tw:text-xs tw:h-[calc(100%-1rem)] tw:min-h-[5em] tw:pb-2 tw:overflow-auto' />
), }, { title: 'Links', component: (
{state.relations && state.relations.map((i) => (
navigate('/item/' + i.id)} > unlinkItem(id, item, updateItem)} loading={loading} />
))} {updatePermission && ( linkItem(id, item, updateItem)} > )}
), }, ]} > ) }