import AbstractService from './abstractService'
import LinkShareModel from '@/models/linkShare'
import type {ILinkShare} from '@/modelTypes/ILinkShare'

export default class LinkShareService extends AbstractService<ILinkShare> {
	constructor() {
		super({
			getAll: '/lists/{listId}/shares',
			get: '/lists/{listId}/shares/{id}',
			create: '/lists/{listId}/shares',
			delete: '/lists/{listId}/shares/{id}',
		})
	}

	modelFactory(data) {
		return new LinkShareModel(data)
	}
}