import { useCallback } from 'react';
import { GithubTypes } from '@refocus/sdk';
import {
IoCheckmarkDoneCircleOutline,
IoCloseCircleOutline,
} from 'react-icons/io5';
import { RxTimer } from 'react-icons/rx';
import { FiPlayCircle } from 'react-icons/fi';
import { GoQuestion } from 'react-icons/go';
import { Avatar, Card, View } from '../../base';
import { Typography } from '../../typography';
type ActionProps = {
action: GithubTypes.WorkflowRun;
onPress?: (action: GithubTypes.WorkflowRun) => void;
};
const getIcon = (status: string | null) => {
switch (status) {
case 'success':
return ;
case 'failure':
return ;
case 'in_progress':
return ;
case 'queued':
return ;
default:
return ;
}
};
const Action: React.FC = ({ action, onPress }) => {
const onPressHandler = useCallback(() => {
onPress?.(action);
}, [action, onPress]);
return (
{action.name} - {action.actor?.name || action.actor?.login}
{action.display_title}
{action.status}
{getIcon(action.status)}
);
};
export { Action };