Remove unused components and models for improved maintainability

- Deleted redundant components (`AddActionButton`, `AlertBox`, `AlertStack`, `BackButton`, `CancelButton`, and `CollapsableArea`) and related files.
- Removed unused models (`Book`, `BookSerie`, `BookTables`, `Character`, and `Chapter`) to reduce codebase clutter.
- Updated project structure and references to reflect these removals.
This commit is contained in:
natreex
2026-03-22 22:37:31 -04:00
parent e8aaef108b
commit 64ed90d993
229 changed files with 15091 additions and 21289 deletions

View File

@@ -1,9 +1,9 @@
import {ChangeEvent} from 'react';
import {faTrash} from '@fortawesome/free-solid-svg-icons';
import {ActChapter} from '@/lib/models/Chapter';
import React, {ChangeEvent} from 'react';
import {Trash2} from 'lucide-react';
import {ActChapter} from '@/lib/types/chapter';
import InputField from '@/components/form/InputField';
import TexteAreaInput from '@/components/form/TexteAreaInput';
import {useTranslations} from 'next-intl';
import TextAreaInput from '@/components/form/TextAreaInput';
import {useTranslations} from '@/lib/i18n';
interface ActChapterItemProps {
chapter: ActChapter;
@@ -15,11 +15,10 @@ export default function ActChapterItem({chapter, onUpdateSummary, onUnlink}: Act
const t = useTranslations('actComponent');
return (
<div
className="bg-secondary/20 p-4 rounded-xl mb-3 border border-secondary/30 shadow-sm hover:shadow-md transition-all duration-200">
<div className="mb-3">
<InputField
input={
<TexteAreaInput
<TextAreaInput
value={chapter.summary || ''}
setValue={(e: ChangeEvent<HTMLTextAreaElement>) =>
onUpdateSummary(chapter.chapterId, e.target.value)
@@ -27,7 +26,7 @@ export default function ActChapterItem({chapter, onUpdateSummary, onUnlink}: Act
placeholder={t('chapterSummaryPlaceholder')}
/>
}
actionIcon={faTrash}
actionIcon={Trash2}
fieldName={chapter.title}
action={(): Promise<void> => onUnlink(chapter.chapterInfoId, chapter.chapterId)}
actionLabel={t('remove')}

View File

@@ -1,12 +1,10 @@
import {useState} from 'react';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faChevronDown, faChevronUp} from '@fortawesome/free-solid-svg-icons';
import {ActChapter, ChapterListProps} from '@/lib/models/Chapter';
import {SelectBoxProps} from '@/shared/interface';
import React, {useState} from 'react';
import {ActChapter, ChapterListProps} from '@/lib/types/chapter';
import SelectBox, {SelectBoxProps} from '@/components/form/SelectBox';
import ActChapterItem from './ActChapter';
import InputField from '@/components/form/InputField';
import SelectBox from '@/components/form/SelectBox';
import {useTranslations} from 'next-intl';
import Collapse from '@/components/ui/Collapse';
import {useTranslations} from '@/lib/i18n';
interface ActChaptersSectionProps {
actId: number;
@@ -42,52 +40,45 @@ export default function ActChaptersSection({
}
return (
<div className="mb-4">
<button
className="flex justify-between items-center w-full bg-secondary/50 p-3 rounded-xl text-left hover:bg-secondary transition-all duration-200 shadow-sm"
onClick={(): void => onToggleSection(sectionKey)}
>
<span className="font-bold text-text-primary">{t('chapters')}</span>
<FontAwesomeIcon
icon={isExpanded ? faChevronUp : faChevronDown}
className="text-text-primary w-3.5 h-3.5"
/>
</button>
{isExpanded && (
<div className="p-2">
{chapters && chapters.length > 0 ? (
chapters.map((chapter: ActChapter) => (
<Collapse title={t('chapters')} defaultOpen={isExpanded}>
<div className="space-y-2">
{chapters && chapters.length > 0 ? (
chapters.map(function (chapter: ActChapter): React.JSX.Element {
return (
<ActChapterItem
key={`chapter-${chapter.chapterInfoId}`}
chapter={chapter}
onUpdateSummary={(chapterId, summary) =>
onUpdateChapterSummary(chapterId, summary)
}
onUnlink={(chapterInfoId, chapterId) =>
onUnlinkChapter(chapterInfoId, chapterId)
}
onUpdateSummary={function (chapterId: string, summary: string): void {
onUpdateChapterSummary(chapterId, summary);
}}
onUnlink={function (chapterInfoId: string, chapterId: string): Promise<void> {
return onUnlinkChapter(chapterInfoId, chapterId);
}}
/>
))
) : (
<p className="text-text-secondary text-center text-sm p-2">
{t('noLinkedChapter')}
</p>
)}
<InputField
addButtonCallBack={(): Promise<void> => onLinkChapter(actId, selectedChapterId)}
input={
<SelectBox
defaultValue={null}
onChangeCallBack={(e) => setSelectedChapterId(e.target.value)}
data={mainChaptersData()}
placeholder={t('selectChapterPlaceholder')}
/>
}
isAddButtonDisabled={!selectedChapterId}
/>
</div>
)}
</div>
);
})
) : (
<p className="text-text-secondary text-center text-sm p-2">
{t('noLinkedChapter')}
</p>
)}
<InputField
addButtonCallBack={function (): Promise<void> {
return onLinkChapter(actId, selectedChapterId);
}}
input={
<SelectBox
defaultValue={null}
onChangeCallBack={function (e: React.ChangeEvent<HTMLSelectElement>): void {
setSelectedChapterId(e.target.value);
}}
data={mainChaptersData()}
placeholder={t('selectChapterPlaceholder')}
/>
}
isAddButtonDisabled={!selectedChapterId}
/>
</div>
</Collapse>
);
}

View File

@@ -1,8 +1,8 @@
import {ChangeEvent} from 'react';
import {faTrash} from '@fortawesome/free-solid-svg-icons';
import React, {ChangeEvent} from 'react';
import {Trash2} from 'lucide-react';
import InputField from '@/components/form/InputField';
import TexteAreaInput from '@/components/form/TexteAreaInput';
import {useTranslations} from 'next-intl';
import TextAreaInput from '@/components/form/TextAreaInput';
import {useTranslations} from '@/lib/i18n';
interface ActDescriptionProps {
actId: number;
@@ -44,7 +44,7 @@ export default function ActDescription({actId, summary, onUpdateSummary}: ActDes
<InputField
fieldName={getActSummaryTitle(actId)}
input={
<TexteAreaInput
<TextAreaInput
value={summary || ''}
setValue={(e: ChangeEvent<HTMLTextAreaElement>) =>
onUpdateSummary(actId, e.target.value)
@@ -52,7 +52,7 @@ export default function ActDescription({actId, summary, onUpdateSummary}: ActDes
placeholder={getActSummaryPlaceholder(actId)}
/>
}
actionIcon={faTrash}
actionIcon={Trash2}
actionLabel={t('delete')}
/>
</div>

View File

@@ -1,10 +1,14 @@
import {useState} from 'react';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faChevronDown, faChevronUp, faPlus, faTrash} from '@fortawesome/free-solid-svg-icons';
import {Incident} from '@/lib/models/Book';
import {ActChapter, ChapterListProps} from '@/lib/models/Chapter';
import React, {useState} from 'react';
import {ChevronDown, ChevronUp, Plus, Trash2} from 'lucide-react';
import {Incident} from '@/lib/types/book';
import {ActChapter, ChapterListProps} from '@/lib/types/chapter';
import ActChapterItem from './ActChapter';
import {useTranslations} from 'next-intl';
import IconButton from '@/components/ui/IconButton';
import Collapse from '@/components/ui/Collapse';
import SelectBox, {SelectBoxProps} from '@/components/form/SelectBox';
import InputField from '@/components/form/InputField';
import TextInput from '@/components/form/TextInput';
import {useTranslations} from '@/lib/i18n';
interface ActIncidentsProps {
incidents: Incident[];
@@ -48,129 +52,120 @@ export default function ActIncidents({
}));
}
function mainChaptersData(): SelectBoxProps[] {
return mainChapters.map(function (chapter: ChapterListProps): SelectBoxProps {
return {
value: chapter.chapterId,
label: `${chapter.chapterOrder}. ${chapter.title}`,
};
});
}
return (
<div className="mb-4">
<button
className="flex justify-between items-center w-full bg-secondary/50 p-3 rounded-xl text-left hover:bg-secondary transition-all duration-200 shadow-sm"
onClick={(): void => onToggleSection(sectionKey)}
>
<span className="font-bold text-text-primary">{t('incidentsTitle')}</span>
<FontAwesomeIcon
icon={isExpanded ? faChevronUp : faChevronDown}
className="text-text-primary w-3.5 h-3.5"
/>
</button>
{isExpanded && (
<div className="p-2">
{incidents && incidents.length > 0 ? (
<>
{incidents.map((item: Incident) => {
const itemKey = `incident_${item.incidentId}`;
const isItemExpanded: boolean = expandedItems[itemKey];
return (
<div
key={`incident-${item.incidentId}`}
className="bg-secondary/30 rounded-xl mb-3 overflow-hidden border border-secondary/40 shadow-sm hover:shadow-md transition-all duration-200"
>
<button
className="flex justify-between items-center w-full p-2 text-left"
onClick={(): void => toggleItem(itemKey)}
>
<span className="font-bold text-text-primary">{item.title}</span>
<div className="flex items-center">
<FontAwesomeIcon
icon={isItemExpanded ? faChevronUp : faChevronDown}
className="text-text-primary w-3.5 h-3.5 mr-2"
/>
<button
onClick={async (e) => {
e.stopPropagation();
await onDeleteIncident(actId, item.incidentId);
}}
className="text-error hover:bg-error/20 p-1.5 rounded-lg transition-all duration-200 hover:scale-110"
>
<FontAwesomeIcon icon={faTrash} className="w-3.5 h-3.5"/>
</button>
</div>
</button>
{isItemExpanded && (
<div className="p-3 bg-secondary/20">
{item.chapters && item.chapters.length > 0 ? (
<>
{item.chapters.map((chapter: ActChapter) => (
<ActChapterItem
key={`inc-chapter-${chapter.chapterId}-${chapter.chapterInfoId}`}
chapter={chapter}
onUpdateSummary={(chapterId, summary) =>
onUpdateChapterSummary(chapterId, summary, item.incidentId)
}
onUnlink={(chapterInfoId, chapterId) =>
onUnlinkChapter(chapterInfoId, chapterId, item.incidentId)
}
/>
))}
</>
) : (
<p className="text-text-secondary text-center text-sm p-2">
{t('noLinkedChapter')}
</p>
)}
<div className="flex items-center mt-2">
<select
onChange={(e) => setSelectedChapterId(e.target.value)}
className="flex-1 bg-secondary/50 text-text-primary rounded-xl px-4 py-2.5 mr-2 border border-secondary/50 focus:outline-none focus:ring-4 focus:ring-primary/20 focus:border-primary hover:bg-secondary hover:border-secondary transition-all duration-200"
>
<option value="">{t('selectChapterPlaceholder')}</option>
{mainChapters.map((chapter: ChapterListProps) => (
<option key={chapter.chapterId} value={chapter.chapterId}>
{`${chapter.chapterOrder}. ${chapter.title}`}
</option>
))}
</select>
<button
className="bg-primary text-text-primary w-9 h-9 rounded-full flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed shadow-md hover:shadow-lg hover:scale-110 hover:bg-primary-dark transition-all duration-200"
onClick={(): Promise<void> =>
onLinkChapter(actId, selectedChapterId, item.incidentId)
}
disabled={selectedChapterId.length === 0}
>
<FontAwesomeIcon icon={faPlus} className="w-3.5 h-3.5"/>
</button>
</div>
</div>
)}
<Collapse title={t('incidentsTitle')} defaultOpen={isExpanded}>
<div className="space-y-3">
{incidents && incidents.length > 0 ? (
incidents.map(function (item: Incident): React.JSX.Element {
const itemKey: string = `incident_${item.incidentId}`;
const isItemExpanded: boolean = expandedItems[itemKey];
return (
<div key={`incident-${item.incidentId}`}
className="bg-secondary rounded-xl overflow-hidden">
<button
className="flex justify-between items-center w-full p-3 text-left"
onClick={function (): void {
toggleItem(itemKey);
}}
>
<span className="font-bold text-text-primary">{item.title}</span>
<div className="flex items-center gap-1">
{isItemExpanded
? <ChevronUp className="text-primary w-3.5 h-3.5" strokeWidth={1.75}/>
: <ChevronDown className="text-primary w-3.5 h-3.5" strokeWidth={1.75}/>
}
<div onClick={function (e: React.MouseEvent): void {
e.stopPropagation();
}}>
<IconButton
icon={Trash2}
variant="danger"
size="sm"
onClick={async function (): Promise<void> {
await onDeleteIncident(actId, item.incidentId);
}}
/>
</div>
</div>
);
})}
</>
) : (
<p className="text-text-secondary text-center text-sm p-2">
{t('noIncidentAdded')}
</p>
)}
<div className="flex items-center mt-2">
<input
type="text"
className="flex-1 bg-secondary/50 text-text-primary rounded-xl px-4 py-2.5 mr-2 border border-secondary/50 focus:outline-none focus:ring-4 focus:ring-primary/20 focus:border-primary hover:bg-secondary hover:border-secondary transition-all duration-200 placeholder:text-muted/60"
</button>
{isItemExpanded && (
<div className="p-3">
{item.chapters && item.chapters.length > 0 ? (
item.chapters.map(function (chapter: ActChapter): React.JSX.Element {
return (
<ActChapterItem
key={`inc-chapter-${chapter.chapterId}-${chapter.chapterInfoId}`}
chapter={chapter}
onUpdateSummary={function (chapterId: string, summary: string): void {
onUpdateChapterSummary(chapterId, summary, item.incidentId);
}}
onUnlink={function (chapterInfoId: string, chapterId: string): Promise<void> {
return onUnlinkChapter(chapterInfoId, chapterId, item.incidentId);
}}
/>
);
})
) : (
<p className="text-text-secondary text-center text-sm p-2">
{t('noLinkedChapter')}
</p>
)}
<InputField
input={
<SelectBox
defaultValue={null}
onChangeCallBack={function (e: React.ChangeEvent<HTMLSelectElement>): void {
setSelectedChapterId(e.target.value);
}}
data={mainChaptersData()}
placeholder={t('selectChapterPlaceholder')}
/>
}
addButtonCallBack={function (): Promise<void> {
return onLinkChapter(actId, selectedChapterId, item.incidentId);
}}
isAddButtonDisabled={selectedChapterId.length === 0}
/>
</div>
)}
</div>
);
})
) : (
<p className="text-text-secondary text-center text-sm p-2">
{t('noIncidentAdded')}
</p>
)}
<InputField
input={
<TextInput
value={newIncidentTitle}
onChange={(e) => setNewIncidentTitle(e.target.value)}
setValue={function (e: React.ChangeEvent<HTMLInputElement>): void {
setNewIncidentTitle(e.target.value);
}}
placeholder={t('newIncidentPlaceholder')}
/>
<button
className="bg-primary text-text-primary w-9 h-9 rounded-full flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed shadow-md hover:shadow-lg hover:scale-110 hover:bg-primary-dark transition-all duration-200"
onClick={(): Promise<void> => onAddIncident(actId)}
disabled={newIncidentTitle.trim() === ''}
>
<FontAwesomeIcon icon={faPlus} className="w-3.5 h-3.5"/>
</button>
</div>
</div>
)}
</div>
}
actionIcon={Plus}
addButtonCallBack={function (): Promise<void> {
return onAddIncident(actId);
}}
isAddButtonDisabled={newIncidentTitle.trim() === ''}
/>
</div>
</Collapse>
);
}

View File

@@ -1,13 +1,14 @@
import {useState} from 'react';
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
import {faChevronDown, faChevronUp, faPlus, faTrash} from '@fortawesome/free-solid-svg-icons';
import {Incident, PlotPoint} from '@/lib/models/Book';
import {ActChapter, ChapterListProps} from '@/lib/models/Chapter';
import {SelectBoxProps} from '@/shared/interface';
import React, {useState} from 'react';
import {ChevronDown, ChevronUp, Plus, Trash2} from 'lucide-react';
import {Incident, PlotPoint} from '@/lib/types/book';
import {ActChapter, ChapterListProps} from '@/lib/types/chapter';
import SelectBox, {SelectBoxProps} from '@/components/form/SelectBox';
import ActChapterItem from './ActChapter';
import InputField from '@/components/form/InputField';
import SelectBox from '@/components/form/SelectBox';
import {useTranslations} from 'next-intl';
import TextInput from '@/components/form/TextInput';
import IconButton from '@/components/ui/IconButton';
import Collapse from '@/components/ui/Collapse';
import {useTranslations} from '@/lib/i18n';
interface ActPlotPointsProps {
plotPoints: PlotPoint[];
@@ -65,138 +66,136 @@ export default function ActPlotPoints({
}
return (
<div className="mb-4">
<button
className="flex justify-between items-center w-full bg-secondary/50 p-3 rounded-xl text-left hover:bg-secondary transition-all duration-200 shadow-sm"
onClick={(): void => onToggleSection(sectionKey)}
>
<span className="font-bold text-text-primary">{t('plotPointsTitle')}</span>
<FontAwesomeIcon
icon={isExpanded ? faChevronUp : faChevronDown}
className="text-text-primary w-3.5 h-3.5"
/>
</button>
{isExpanded && (
<div className="p-2">
{plotPoints && plotPoints.length > 0 ? (
plotPoints.map((item: PlotPoint) => {
const itemKey = `plotpoint_${item.plotPointId}`;
const isItemExpanded: boolean = expandedItems[itemKey];
const linkedIncident: Incident | undefined = incidents.find(
(inc: Incident): boolean => inc.incidentId === item.linkedIncidentId
);
return (
<div
key={`plot-point-${item.plotPointId}`}
className="bg-secondary/30 rounded-xl mb-3 overflow-hidden border border-secondary/40 shadow-sm hover:shadow-md transition-all duration-200"
<Collapse title={t('plotPointsTitle')} defaultOpen={isExpanded}>
<div className="space-y-3">
{plotPoints && plotPoints.length > 0 ? (
plotPoints.map(function (item: PlotPoint): React.JSX.Element {
const itemKey: string = `plotpoint_${item.plotPointId}`;
const isItemExpanded: boolean = expandedItems[itemKey];
const linkedIncident: Incident | undefined = incidents.find(
function (inc: Incident): boolean {
return inc.incidentId === item.linkedIncidentId;
}
);
return (
<div key={`plot-point-${item.plotPointId}`}
className="bg-secondary rounded-xl overflow-hidden">
<button
className="flex justify-between items-center w-full p-3 text-left"
onClick={function (): void {
toggleItem(itemKey);
}}
>
<button
className="flex justify-between items-center w-full p-2 text-left"
onClick={(): void => toggleItem(itemKey)}
>
<div>
<p className="font-bold text-text-primary">{item.title}</p>
{linkedIncident && (
<p className="text-text-secondary text-sm italic">
{t('linkedTo')}: {linkedIncident.title}
</p>
)}
</div>
<div className="flex items-center">
<FontAwesomeIcon
icon={isItemExpanded ? faChevronUp : faChevronDown}
className="text-text-primary w-3.5 h-3.5 mr-2"
/>
<button
onClick={async (e): Promise<void> => {
e.stopPropagation();
<div>
<p className="font-bold text-text-primary">{item.title}</p>
{linkedIncident && (
<p className="text-text-secondary text-sm italic">
{t('linkedTo')}: {linkedIncident.title}
</p>
)}
</div>
<div className="flex items-center gap-1">
{isItemExpanded
? <ChevronUp className="text-primary w-3.5 h-3.5" strokeWidth={1.75}/>
: <ChevronDown className="text-primary w-3.5 h-3.5" strokeWidth={1.75}/>
}
<div onClick={function (e: React.MouseEvent): void {
e.stopPropagation();
}}>
<IconButton
icon={Trash2}
variant="danger"
size="sm"
onClick={async function (): Promise<void> {
await onDeletePlotPoint(actId, item.plotPointId);
}}
className="text-error hover:bg-error/20 p-1.5 rounded-lg transition-all duration-200 hover:scale-110"
>
<FontAwesomeIcon icon={faTrash} className="w-3.5 h-3.5"/>
</button>
/>
</div>
</button>
{isItemExpanded && (
<div className="p-3 bg-secondary/20">
{item.chapters && item.chapters.length > 0 ? (
item.chapters.map((chapter: ActChapter) => (
</div>
</button>
{isItemExpanded && (
<div className="p-3">
{item.chapters && item.chapters.length > 0 ? (
item.chapters.map(function (chapter: ActChapter): React.JSX.Element {
return (
<ActChapterItem
key={`plot-chapter-${chapter.chapterId}-${chapter.chapterInfoId}`}
chapter={chapter}
onUpdateSummary={(chapterId, summary) =>
onUpdateChapterSummary(chapterId, summary, item.plotPointId)
}
onUnlink={(chapterInfoId, chapterId) =>
onUnlinkChapter(chapterInfoId, chapterId, item.plotPointId)
}
onUpdateSummary={function (chapterId: string, summary: string): void {
onUpdateChapterSummary(chapterId, summary, item.plotPointId);
}}
onUnlink={function (chapterInfoId: string, chapterId: string): Promise<void> {
return onUnlinkChapter(chapterInfoId, chapterId, item.plotPointId);
}}
/>
))
) : (
<p className="text-text-secondary text-center text-sm p-2">
{t('noLinkedChapter')}
</p>
)}
<div className="flex items-center mt-2">
<select
onChange={(e) => setSelectedChapterId(e.target.value)}
className="flex-1 bg-secondary/50 text-text-primary rounded-xl px-4 py-2.5 mr-2 border border-secondary/50 focus:outline-none focus:ring-4 focus:ring-primary/20 focus:border-primary hover:bg-secondary hover:border-secondary transition-all duration-200"
>
<option value="">{t('selectChapterPlaceholder')}</option>
{mainChapters.map((chapter: ChapterListProps) => (
<option key={chapter.chapterId} value={chapter.chapterId}>
{`${chapter.chapterOrder}. ${chapter.title}`}
</option>
))}
</select>
<button
className="bg-primary text-text-primary w-9 h-9 rounded-full flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed shadow-md hover:shadow-lg hover:scale-110 hover:bg-primary-dark transition-all duration-200"
onClick={() => onLinkChapter(actId, selectedChapterId, item.plotPointId)}
disabled={!selectedChapterId}
>
<FontAwesomeIcon icon={faPlus} className="w-3.5 h-3.5"/>
</button>
</div>
</div>
)}
</div>
);
})
) : (
<p className="text-text-secondary text-center text-sm p-2">
{t('noPlotPointAdded')}
</p>
)}
<div className="mt-2 space-y-2">
<div className="flex items-center">
<input
type="text"
className="flex-1 bg-secondary/50 text-text-primary rounded-xl px-4 py-2.5 border border-secondary/50 focus:outline-none focus:ring-4 focus:ring-primary/20 focus:border-primary hover:bg-secondary hover:border-secondary transition-all duration-200 placeholder:text-muted/60"
value={newPlotPointTitle}
onChange={(e) => setNewPlotPointTitle(e.target.value)}
placeholder={t('newPlotPointPlaceholder')}
);
})
) : (
<p className="text-text-secondary text-center text-sm p-2">
{t('noLinkedChapter')}
</p>
)}
<InputField
input={
<SelectBox
onChangeCallBack={function (e: React.ChangeEvent<HTMLSelectElement>): void {
setSelectedChapterId(e.target.value);
}}
data={mainChapters.map(function (chapter: ChapterListProps): SelectBoxProps {
return {
label: `${chapter.chapterOrder}. ${chapter.title}`,
value: chapter.chapterId,
};
})}
defaultValue={selectedChapterId}
placeholder={t('selectChapterPlaceholder')}
/>
}
addButtonCallBack={function (): Promise<void> {
return onLinkChapter(actId, selectedChapterId, item.plotPointId);
}}
isAddButtonDisabled={!selectedChapterId}
/>
</div>
)}
</div>
);
})
) : (
<p className="text-text-secondary text-center text-sm p-2">
{t('noPlotPointAdded')}
</p>
)}
<div className="space-y-2">
<TextInput
value={newPlotPointTitle}
setValue={function (e: React.ChangeEvent<HTMLInputElement>): void {
setNewPlotPointTitle(e.target.value);
}}
placeholder={t('newPlotPointPlaceholder')}
/>
<InputField
input={
<SelectBox
defaultValue=""
onChangeCallBack={function (e: React.ChangeEvent<HTMLSelectElement>): void {
setSelectedIncidentId(e.target.value);
}}
data={getIncidentData()}
/>
</div>
<InputField
input={
<SelectBox
defaultValue={``}
onChangeCallBack={(e) => setSelectedIncidentId(e.target.value)}
data={getIncidentData()}
/>
}
addButtonCallBack={(): Promise<void> => onAddPlotPoint(actId)}
isAddButtonDisabled={newPlotPointTitle.trim() === ''}
/>
</div>
}
actionIcon={Plus}
addButtonCallBack={function (): Promise<void> {
return onAddPlotPoint(actId);
}}
isAddButtonDisabled={newPlotPointTitle.trim() === ''}
/>
</div>
)}
</div>
</div>
</Collapse>
);
}