"use client";
import { PencilIcon, PlusCircleIcon } from "lucide-react";
import { useTranslations } from "next-intl";
import React from "react";
import { Button, DialogTrigger } from "../../shadcnui";
type CommonEditorTriggerProps = { isEdit: boolean; edit?: string; create?: string; testId?: string; title?: string };
export function CommonEditorTrigger({ isEdit, edit: _edit, create, testId, title }: CommonEditorTriggerProps) {
const t = useTranslations();
return (
{title ? (
} nativeButton={false} size="sm" variant={`outline`} data-testid={testId}>
{title}
) : isEdit ? (
}
nativeButton={false}
size="sm"
variant={`ghost`}
className="text-muted-foreground"
data-testid={testId}
>
) : (
} nativeButton={false} size="sm" variant={`outline`} data-testid={testId}>
{create ? create : t(`ui.buttons.create`)}
)}
);
}
export const CommonAddTrigger = React.forwardRef>(
(props, ref) => (
),
);
CommonAddTrigger.displayName = "CommonAddTrigger";