async function create_library_symbol({ name = '', code, content, preview, group }) {
	const symbol_id = uuidv4()
	const changes = { 
		entries: db_utils.generate_entry_changes([], content.entries), 
		fields: db_utils.generate_field_changes([], content.fields) 
	}
	await Promise.all([
		(async() => {
			let library_symbols_res = await supabase.from('library_symbols').insert({ id: symbol_id, code, name: name, index: 0, group, owner: get(page).data.user.id }).select().single()
			if (library_symbols_res.error) {
				console.log('Failed to insert symbols', library_symbols_res)
				throw new Error('Failed to insert symbols')
			}
		
			// DB: save Symbol fields
			await helpers.handle_field_changes_new(changes.fields.map(f => ({ ...f, symbol: null })), {
				library_symbol: symbol_id
			})

			// DB: save Symbol entries
			await helpers.handle_content_changes_new(changes.entries.map(f => ({ ...f, symbol: null })), {
				library_symbol: symbol_id
			})
		})(),
		supabase.storage.from('symbols').upload(`${symbol_id}/preview.html`, preview)
	])
}
Creates a new library symbol
@param {Object} options - The symbol creation options
@param {string} [options.name=''] - The name of the symbol
@param {Object} options.code - The symbol code (html, css, js)
@param {Object} options.content - The symbol's content
@param {Array<import('$lib').Entry>} options.content.entries - Array of entry objects
@param {Array<import('$lib').Field>} options.content.fields - Array of field objects
@param {string} options.preview - The preview HTML
@param {string} options.group - The group ID this symbol belongs to
@returns {Promise<void>}