import{j as t}from"./vendor-react-wBh_31cN.js";import{C as i}from"./code-BepIAQDJ.js";import{u as p}from"./useTitle-DQo_L6Ox.js";import{t as m}from"./titles-CzjGGAB3.js";import{G as c,r as u}from"./index-BKr2rJhV.js";import{u as l}from"./useCurrentProject-C6qZaZgv.js";import{g as d}from"./getHopsDoc-BWSxyuXn.js";import{C as f}from"./callout-Dd8FkTQe.js";import{C as h,a as j,b as C,c as x}from"./card-DISTA6Ay.js";import{C as g}from"./card-link-CAhlzNs_.js";import{u as k}from"./vendor-router-D1GqFWiT.js";import"./vendor-icons-BUUmD6ht.js";import"./vendor-redux-CJZrIb6x.js";import"./vendor-utils-OeoE2qq_.js";import"./vendor-radix-BRyWS4bQ.js";import"./vendor-grid-CeFlDWv4.js";import"./useProject-FSnHbCQX.js";import"./index-BeaoFlb1.js";const y=(r,s)=>{const e=[["import hopsworks",""],["project = hopsworks.login(",""],[`    host="${r}",`,"DNS of your Hopsworks instance"],[`    project="${s}",`,"Name of your Hopsworks project"],['    api_key_value="PASTE YOUR API KEY HERE"',"Hopsworks API key value"],[")",""],["fs = project.get_feature_store()","Get the project's default feature store"]],a=Math.max(...e.map(([o])=>o.length));return{title:"Configuration",language:"python",content:e.map(([o,n])=>n?`${o.padEnd(a+2)}# ${n}`:o).join(`
`)}},F=()=>{p(m.code);const r=k(),s=window.location.hostname,{project:e}=l(),a=y(s,e==null?void 0:e.projectName);return t.jsxs(h,{children:[t.jsxs(j,{className:"flex flex-row items-center justify-between",children:[t.jsx(C,{children:"Connect to Feature Store"}),t.jsx(g,{href:d("/user_guides/integrations/python/"),external:!0,children:"documentation"})]}),t.jsxs(x,{children:[t.jsx(f,{variant:"neutral",className:"mb-5",children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{children:"To use this snippet, you have to paste an Hopsworks API key"}),t.jsx(c,{variant:"secondary",size:"sm",onClick:()=>{r(u.account.api.create)},children:"Create API key"})]})}),t.jsx(i,{copyButton:!0,...a})]})]})};export{F as default};
