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