import { v4 as uuid } from 'uuid';
import { entries, setData } from '../../utils/data.utils';
export const getUserTemplates = (_userId) => entries({ startsWith: '/templates/' });
export const createTemplate = (data) => {
  const id = uuid();
  return setData({ key: `/templates/${id}`, id, data });
};
export const updateTemplate = (template) => {
  const { data, id } = template;
  return setData({ key: `/templates/${id}`, id, data });
};
