//
//  ClubImportView.swift
//  PadelClub
//
//  Created by Razmig Sarkissian on 21/03/2024.
//

import SwiftUI

struct ClubImportView: View {
    @Environment(\.dismiss) var dismiss
    var selection: ((Club) -> ())? = nil

    var body: some View {
        NavigationStack {
            ClubSearchView(displayContext: .addition, selection: selection)
                .toolbar {
                    ToolbarItem(placement: .cancellationAction) {
                        Button("Annuler", role: .cancel) {
                            dismiss()
                        }
                    }
//                    ToolbarItem(placement: .bottomBar) {
//                        Button("Valider") {
//                            try? dataStore.clubs.addOrUpdate(instance: club)
//                            dismiss()
//                        }
//                        .buttonStyle(.borderedProminent)
//                        .disabled(club.isValid == false)
//                    }
                }

        }
    }
}

//#Preview {
//    ClubImportView()
//}

/*
 jQuery.extend(Drupal.settings, {"basePath":"\/","pathPrefix":"","setHasJsCookie":0,"ajaxPageState":{"theme":"met","theme_token":"utLEekigHne808an7j1tJnCcET9qmvCzWWw4NgcPkZ8","jquery_version":"2.2","jquery_version_token":"scWlNljFircoQ0sImdjBmQd-ItZCEG4rYp2CfoxyMbw","css":{"modules\/system\/system.base.css":1,"misc\/ui\/jquery.ui.core.css":1,"misc\/ui\/jquery.ui.theme.css":1,"modules\/field\/theme\/field.css":1,"modules\/node\/node.css":1,"sites\/all\/modules\/contrib\/views\/css\/views.css":1,"sites\/all\/modules\/contrib\/back_to_top\/css\/back_to_top.css":1,"sites\/all\/modules\/contrib\/media\/modules\/media_wysiwyg\/css\/media_wysiwyg.base.css":1,"sites\/all\/libraries\/dynatable\/jquery.dynatable.css":1,"sites\/all\/modules\/custom\/actency_itineraire\/css\/actency_itineraire.css":1,"sites\/all\/modules\/contrib\/ctools\/css\/ctools.css":1,"sites\/all\/modules\/contrib\/video\/css\/video.css":1,"sites\/all\/modules\/contrib\/ctools\/css\/modal.css":1,"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@3.4.1\/dist\/css\/bootstrap.min.css":1,"https:\/\/cdn.jsdelivr.net\/npm\/@unicorn-fail\/drupal-bootstrap-styles@0.0.2\/dist\/3.3.1\/7.x-3.x\/drupal-bootstrap.min.css":1,"https:\/\/stackpath.bootstrapcdn.com\/font-awesome\/4.7.0\/css\/font-awesome.min.css":1,"sites\/all\/modules\/custom\/actency_background\/css\/actency_background.css":1,"sites\/all\/themes\/met\/public\/css\/met.css":1},"js":{"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@3.4.1\/dist\/js\/bootstrap.min.js":1,"sites\/all\/themes\/met\/public\/js\/club.js":1,"\/\/cdn.tagcommander.com\/3288\/tc_FFT_19.js":1,"sites\/all\/modules\/custom\/met_tagcommander\/js\/met_tagcommander.js":1,"sites\/all\/themes\/bootstrap\/js\/bootstrap.js":1,"sites\/all\/modules\/contrib\/jquery_update\/replace\/jquery\/2.2\/jquery.min.js":1,"misc\/jquery-extend-3.4.0.js":1,"misc\/jquery-html-prefilter-3.5.0-backport.js":1,"misc\/jquery.once.js":1,"misc\/drupal.js":1,"sites\/all\/modules\/contrib\/jquery_update\/js\/jquery_browser.js":1,"sites\/all\/modules\/contrib\/jquery_update\/replace\/ui\/ui\/minified\/jquery.ui.core.min.js":1,"sites\/all\/modules\/contrib\/jquery_update\/replace\/ui\/ui\/minified\/jquery.ui.effect.min.js":1,"sites\/all\/modules\/contrib\/jquery_update\/replace\/ui\/external\/jquery.cookie.js":1,"sites\/all\/modules\/contrib\/jquery_update\/replace\/jquery.form\/4\/jquery.form.min.js":1,"misc\/ajax.js":1,"sites\/all\/modules\/contrib\/jquery_update\/js\/jquery_update.js":1,"sites\/all\/modules\/custom\/actency_dynatable\/actency_dynatable.js":1,"sites\/all\/modules\/contrib\/entityreference\/js\/entityreference.js":1,"sites\/all\/modules\/contrib\/back_to_top\/js\/back_to_top.js":1,"public:\/\/languages\/fr_WZMeukhvWvW_cblXuy_3SROUpPpfX7YEK6xml2YasT8.js":1,"sites\/all\/libraries\/dynatable\/jquery.dynatable.js":1,"sites\/all\/modules\/custom\/actency_popup_message\/js\/actency_popup_message.js":1,"sites\/all\/modules\/contrib\/image_caption\/image_caption.min.js":1,"sites\/all\/modules\/contrib\/video\/js\/video.js":1,"sites\/all\/themes\/bootstrap\/js\/misc\/_progress.js":1,"sites\/all\/modules\/contrib\/ctools\/js\/modal.js":1,"sites\/all\/modules\/custom\/user_actency\/js\/user_actency.js":1,"sites\/all\/modules\/custom\/adherent\/js\/adherent_modal.js":1,"sites\/all\/modules\/custom\/met_tagcommander\/js\/met_tagcommander_vuejs.js":1,"\/\/cdn.tagcommander.com\/3288\/tc_FFT_18.js":1,"sites\/all\/modules\/custom\/tagcommander_click\/js\/tagcommander_click.js":1,"sites\/all\/modules\/custom\/actency_tournoi_favoris\/js\/actency_tournoi_favoris.js":1,"sites\/all\/themes\/met\/js\/met.js":1,"sites\/all\/themes\/bootstrap\/js\/modules\/ctools\/js\/modal.js":1,"sites\/all\/themes\/bootstrap\/js\/misc\/ajax.js":1}},"fft_club":{"fiche":{"nom":"T.C ROQUEFORT-LA-BEDOULE","labels":[{"class":"galaxie","label":"\u00c9cole de Tennis Galaxie (d\u00e8s 3 ans)"},{"class":"fauteuil","label":"Tennis Fauteuil"}]},"labelsRecompenses":[{"class":["meticon-engage","yellow"],"label":"CLUB ENGAG\u00c9","detail":"xxx"}],"description":"","installations":[{"nom":"T.C.R.B.","bgClass":"tennis","photoPrincipale":"","nbTerrainsSurfacesText":"5 terrains de 3 surfaces","adresse":"110 AV Michelangeli - 13830 ROQUEFORT-LA-BEDOULE","pratiques":[{"cssClass":"meticon-racket-tennis-inclined","label":"TENNIS","typesSurfaces":{"dur":{"cssClass":"meticon-surface-hard","natures":{"bp":{"label":"B\u00e9ton poreux","nbTerrainsSurfacesText":"2 terrains"}}},"gazon":{"cssClass":"meticon-surface-other","natures":{"gas":{"label":"Gazon synth\u00e9tique","nbTerrainsSurfacesText":"2 terrains"}}},"autre":{"cssClass":"meticon-ellipsis-v","natures":{"par":{"label":"Parquet","nbTerrainsSurfacesText":"1 terrain dont 1 couvert"}}}}}],"services":{"vestiaires":{"iconClass":"meticon-clothes","label":"Vestiaires","messageInfos":""},"parking":{"iconClass":"meticon-parking","label":"Parking","messageInfos":""},"wifi":{"iconClass":"meticon-wifi","label":"Wifi","messageInfos":"Non disponible"},"television":{"iconClass":"meticon-tv","label":"TV","messageInfos":"Non disponible"},"pmr":{"cssClass":"details-PMR","iconClass":"meticon-wheelchair","label":"Accessibilit\u00e9 PMR","listeServices":[{"class":"active","label":"DOUCHES"},{"class":"active","label":"SANITAIRES"},{"class":"active","label":"TERRAINS"},{"class":"active","label":"CLUB HOUSE"}]}},"horaires":[],"adresseUrl":"https:\/\/www.google.com\/maps\/dir\/?api=1\u0026destination=43.248363,5.585647","photoPlaceholder":"\/sites\/all\/modules\/custom\/fft_vuejs\/modules\/vuejs_club\/img\/installation_default.png"}],"enseignants":[{"diplomeCode":"BE2","fonctionCode":"DS","imageSrc":"\/sites\/all\/modules\/custom\/actency_user_picture\/images\/identification.svg","libelleDiplome":"Professeur","libelleCompletDiplome":"Brevet d\u0027Etat 2\u00e8me degr\u00e9 - Professeur","nom":"TASSARO","nomComplet":"Herv\u00e9 TASSARO","fonction":"Directeur Sportif","specialites":["Tennis sant\u00e9"]},{"diplomeCode":"DE","fonctionCode":"ETP","imageSrc":"\/sites\/all\/modules\/custom\/actency_user_picture\/images\/identification.svg","libelleDiplome":"Moniteur","libelleCompletDiplome":"Dipl\u00f4me d\u0027Etat JEPS Tennis - Moniteur","nom":"TASSARO","nomComplet":"Bastien TASSARO","fonction":"Enseignant tous publics","specialites":[]},{"diplomeCode":"DE","fonctionCode":"ETP","imageSrc":"\/sites\/all\/modules\/custom\/actency_user_picture\/images\/identification.svg","libelleDiplome":"Moniteur","libelleCompletDiplome":"Dipl\u00f4me d\u0027Etat JEPS Tennis - Moniteur","nom":"TASSARO","nomComplet":"GABRIEL TASSARO","fonction":"Enseignant tous publics","specialites":["Padel"]}],"periodes":[{"titre":"Tennis","libelle":"Jan. - F\u00e9v. - Mar. - Avr. - Mai - Juin - Juil. - Ao\u00fb. - Sep. - Oct. - Nov. - D\u00e9c."}],"equipements":[],"services":[{"iconClass":"active","label":"Service de cordage"},{"iconClass":"active","label":"Pr\u00eat de mat\u00e9riel"},{"iconClass":"active","label":"Vente de mat\u00e9riel"}],"effectifs":[{"millesime":"saison 2023 - 2024","jeune":188,"adulte":132,"femme":89,"homme":231,"total":320},{"millesime":"saison 2022 - 2023","jeune":226,"adulte":144,"femme":106,"homme":264,"total":370},{"millesime":"saison 2021 - 2022","jeune":206,"adulte":134,"femme":87,"homme":253,"total":340}],"navigation":[{"label":"Club","href":"\/club\/62130381","actif":true},{"label":"Offres","href":"\/club\/62130381\/offres","actif":false},{"label":"Comp\u00e9titions","href":"\/club\/62130381\/competitions","actif":false},{"label":"\u00c9v\u00e9nements","href":"\/club\/62130381\/evenements","actif":false}],"onglet_actif":"Club","partenaires":[],"question":{"title":"Une question ?","label":"Contactez le club pour en savoir plus.","liste":[{"class":"meticon-phone","label":"T\u00e9l\u00e9phone","infos":"0609546866"},{"class":"meticon-at","label":"Courriel","infos":"\/club\/62130381\/contact\/formulaire"},{"class":"meticon-web","label":"Site web","infos":"http:\/\/www.tc-roquefort-la-bedoule.fr\/"},{"class":"fa fa-facebook","label":"Facebook","infos":"https:\/\/www.facebook.com\/Tennis-Club-de-Roquefort-La-B\u00e9doule"}]},"facebookUrl":"https:\/\/www.facebook.com\/Tennis-Club-de-Roquefort-La-B\u00e9doule"},"vuejs_context":"clubInfo","urlImage":"https:\/\/tenup.fft.fr\/sites\/default\/files\/actency_backgrounds\/propositions_0001_02_0.png","CToolsModal":{"loadingText":"En cours de chargement...","closeText":"Fermer la fen\u00eatre","closeImage":"\u003Cimg class=\u0022img-responsive\u0022 src=\u0022https:\/\/tenup.fft.fr\/sites\/all\/modules\/contrib\/ctools\/images\/icon-close-window.png\u0022 alt=\u0022Fermer la fen\u00eatre\u0022 title=\u0022Fermer la fen\u00eatre\u0022 \/\u003E","throbber":"\u003Cimg class=\u0022img-responsive\u0022 src=\u0022https:\/\/tenup.fft.fr\/sites\/all\/modules\/contrib\/ctools\/images\/throbber.gif\u0022 alt=\u0022En cours de chargement\u0022 title=\u0022En cours de chargement...\u0022 \/\u003E"},"happy-modal-style":{"modalSize":{"type":"fixed","width":320,"max-width":360,"height":180,"addWidth":10,"addHeight":10,"contentRight":10,"contentLeft":10,"contentBottom":10,"top":0},"modalClass":"user-actency-cancel","modalOptions":{"opacity":0.6,"background-color":"#000"},"styleCss":"user_cancel_class"},"better_exposed_filters":{"views":{"partenaires":{"displays":{"block":{"filters":[]}}}}},"back_to_top":{"back_to_top_button_trigger":"100","back_to_top_button_text":"Back to top","#attached":{"library":[["system","ui"]]}},"bootstrap":{"anchorsFix":"0","anchorsSmoothScrolling":"0","formHasError":1,"popoverEnabled":1,"popoverOptions":{"animation":1,"html":0,"placement":"right","selector":"","trigger":"click","triggerAutoclose":1,"title":"","content":"","delay":0,"container":"body"},"tooltipEnabled":1,"tooltipOptions":{"animation":1,"html":0,"placement":"auto left","selector":"","trigger":"hover focus","delay":0,"container":"body"}}});

 */
