import React from "react"; import { CanvasRenderer } from "../canvas-renderer"; import type { FaceBlurMethod, Layer } from "@pien-studio/types"; import type { FaceDetectionOverlay } from "../../hooks/use-face-detection"; type EditorMobileSectionProps = { isDark: boolean; canvasWidth: number; canvasHeight: number; layers: Layer[]; selectedLayerId: string | null; tool: "pointer" | "hand" | "face"; faceDetections: FaceDetectionOverlay[]; faceOverlayLayerId: string | null; faceStatus: "idle" | "detecting" | "unsupported"; faceBlurPreview: { layerId: string; method: FaceBlurMethod; amount: number; regions: { x: number; y: number; width: number; height: number }[]; } | null; labels: { resize: string; faceMlFailedShort: string; detectingFacesShort: string; faceDetectionTip: (count: number) => string; import: string; mood: string; quick: string; face: string; decor: string; }; onOpenCanvasSize: () => void; onImportImage: () => void; onSelectLayer: (id: string | null) => void; onMoveLayer: (id: string, x: number, y: number) => void; onMoveLayerEnd: (id: string, x: number, y: number) => void; onResizeLayer: (id: string, width: number, height: number) => void; onResizeLayerEnd: (id: string, width: number, height: number) => void; onRotateLayer: (id: string, rotation: number) => void; onRotateLayerEnd: (id: string, rotation: number) => void; onInteractionStart: () => void; onInteractionEnd: () => void; }; export function EditorMobileSection(props: EditorMobileSectionProps) { const { isDark, canvasWidth, canvasHeight, layers, selectedLayerId, tool, faceDetections, faceOverlayLayerId, faceStatus, faceBlurPreview, labels, onOpenCanvasSize, onImportImage, onSelectLayer, onMoveLayer, onMoveLayerEnd, onResizeLayer, onResizeLayerEnd, onRotateLayer, onRotateLayerEnd, onInteractionStart, onInteractionEnd, } = props; return (

{canvasWidth} x {canvasHeight}px

{tool === "face" ? (

{faceStatus === "unsupported" ? labels.faceMlFailedShort : faceStatus === "detecting" ? labels.detectingFacesShort : labels.faceDetectionTip(faceDetections.length)}

) : null}
{[labels.mood, labels.quick, labels.face, labels.decor].map((toolLabel) => ( ))}
); }