You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: stylesheet.go
    path of file: ./repos/corteza/server/pkg/provision
    
    the code of the file until where you have to start completion: package provision

import (
	"context"
	"encoding/json"
	"strconv"

	"github.com/cortezaproject/corteza/server/pkg/sass"
	"github.com/cortezaproject/corteza/server/store"
	"github.com/cortezaproject/corteza/server/system/types"
	"go.uber.org/zap"
    
func updateWebappTheme(ctx context.Context, log *zap.Logger, s store.Storer) (err error) {
	vv, _, err := store.SearchSettingValues(ctx, s, types.SettingsFilter{})
	if err != nil {
		return err
	}

	oldCustomCSS := vv.FindByName("ui.custom-css")
	oldBranding := vv.FindByName("ui.studio.branding-sass")
	studioThemes := vv.FindByName("ui.studio.themes")
	customCSSThemes := vv.FindByName("ui.studio.custom-css")

	//get branding themes setting value
	brandingTheme, err := processBrandingTheme(oldBranding)
	if err != nil {
		return err
	}

	//get custom css themes setting value
	customCSSTheme, err := processCustomCSSTheme(oldCustomCSS)
	if err != nil {
		return err
	}

	// provision new themes
	if studioThemes.IsNull() {
		// provision branding themes setting
		err = provisionTheme(ctx, s, "ui.studio.themes", brandingTheme, log)
		if err != nil {
			return err
		}

		if !oldBranding.IsNull() {
			// delete old branding sass settings from the database
			err = store.DeleteSettingValue(ctx, s, oldBranding)
			if err != nil {
				return err
			}
		}
	}

	if customCSSThemes.IsNull() {
		// provision custom CSS themes setting
		err = provisionTheme(ctx, s, "ui.studio.custom-css", customCSSTheme, log)
		if err != nil {
			return err
		}

		if !oldCustomCSS.IsNull() {
			// delete old custom css settings from the database
			err = store.DeleteSettingValue(ctx, s, oldCustomCSS)
			if err != nil {
				return err
			}
		}
	}

	return nil
}