package templates import ( "templ-tests/app/types" "templ-tests/app/data" "slices" "sort" ) templ interactiveButtons() {

Interactive buttons

Bacon ipsum dolor amet cow capicola pancetta picanha biltong brisket filet mignon turducken beef ribs burgdoggen landjaeger meatball venison shank. Capicola ham pork chop, biltong kielbasa pancetta short loin jowl cupim pig jerky drumstick turducken burgdoggen beef. Spare ribs flank ribeye cow doner, shank chuck bacon ham hock porchetta kielbasa tri-tip. Ham t-bone chislic, capicola andouille ham hock frankfurter tri-tip sausage kevin landjaeger shank ribeye. Swine tri-tip spare ribs, rump flank bresaola kevin tail. Meatball tail picanha cow, frankfurter ribeye sirloin pork belly short loin pig. Filet mignon spare ribs pastrami, tri-tip ball tip tongue fatback pork chop.

} func getCatCountriesOptions() []string { var res []string = []string{} for _, cb := range data.CatBreeds { if len(cb.Country) > 0 && !slices.Contains(res, cb.Country) { res = append(res, cb.Country) } } sort.Strings(res) return res } templ catBreedsSection(catBreeds []types.CatBreed) {

Cat breeds

@catBreedsTable(catBreeds) } templ catBreedsTable(catBreeds []types.CatBreed) { for _, breed := range catBreeds { }
Breed Country Origin Coat Pattern
{ breed.Breed } { breed.Country } { breed.Origin } { breed.Coat } { breed.Pattern }
} templ Interactive(pc PageContext, catBreeds []types.CatBreed) { @baseLayout(pc) { @interactiveButtons() @catBreedsSection(catBreeds) } } templ InteractiveSwapContent(pc PageContext, contentIndex int) { switch contentIndex { case 1:

Some new content 1...

case 2:

Some new content 2...

case 3:

Some new content 3...

default:

Some new content with unknown index...

} } templ RenderCatBreedsTable(catBreeds []types.CatBreed) { @catBreedsTable(catBreeds) }